linux免密远程登录配置

linux服务器A远程免秘钥登录服务器B配置

1、ssh-keygen -t rsa

2、创建authorized_keys
touch /root/.ssh/authorized_keys
chmod 600 /root/.ssh/authorized_keys

3、复制公钥id_rsa.pub到authorized_keys

4、登录验证

ssh root@12.2.1.12 -p 22

posted @ 2022-05-24 23:49  小小仓鼠  阅读(50)  评论(0编辑  收藏  举报