ssh免密认证配置

一.首先要做root用户在sshd服务中的允许

XML 复制代码
[root@172 ~]# vim /etc/ssh/sshd_config
XML 复制代码
PermitRootLogin yes

二.监控动作

XML 复制代码
watch -n 1 "tail -n 3 /etc/passwd /etc/group;ls -l /home"

三.用户建立时的命令

1.纯净的实验环境
XML 复制代码
[root@172 ~]# rm -fr ~/.ssh/
2.生成密钥
XML 复制代码
[root@172 ~]# ssh-keygen -f /root/.ssh/id_rsa -P ""
3.上锁
XML 复制代码
[root@172 ~]# ssh-copy-id -i /root/.ssh/id_rsa.pub   root@172.25.254.128

四.测试

相关推荐
YuMiao3 小时前
gstatic连接问题导致Google Gemini / Studio页面乱码或图标缺失问题
服务器·网络协议
碳基沙盒1 天前
OpenClaw 多 Agent 配置实战指南
运维
Sinclair3 天前
简单几步,安卓手机秒变服务器,安装 CMS 程序
android·服务器
Rockbean4 天前
用40行代码搭建自己的无服务器OCR
服务器·python·deepseek
蝎子莱莱爱打怪4 天前
Centos7中一键安装K8s集群以及Rancher安装记录
运维·后端·kubernetes
埃博拉酱4 天前
VS Code Remote SSH 连接 Windows 服务器卡在"下载 VS Code 服务器":prcdn DNS 解析失败的诊断与 BITS 断点续传
windows·ssh·visual studio code
茶杯梦轩4 天前
CompletableFuture 在 项目实战 中 创建异步任务 的核心优势及使用场景
服务器·后端·面试
海天鹰5 天前
【免费】PHP主机=域名+解析+主机
服务器
DianSan_ERP5 天前
电商API接口全链路监控:构建坚不可摧的线上运维防线
大数据·运维·网络·人工智能·git·servlet
呉師傅5 天前
火狐浏览器报错配置文件缺失如何解决#操作技巧#
运维·网络·windows·电脑