服务器配置ssh 登录,取消账号密码登录
服务器配置ssh 登录,取消账号密码登录
准备环境:
被连接的远程服务器:(A)
IP : xxx.xxx.1xx.xxx
密码:1234
连接的远程服务器:(B)
IP : xxx.xxx.xxx.xxx
密码:1234
在(B)服务器端配置
1.生成公钥秘钥:s
ssh-keygen 生成的秘钥文件在/root/.ssh/下
2.添加需要连接远程服务的服务器的认证
ssh-copy-id -i /root/.ssh/id_rsa.pub root@A服务器ip地址
会让你输入服务
原创
2020-09-23 10:55:06 ·
1385 阅读 ·
0 评论