【新教程】ssh免密登录教程-ssh不是默认端口如何免密登录
1 ssh连接是默认端口22
ssh-keygen
ssh-copy-id -i ~/.ssh/id_rsa_for252.pub root@10.199.160.252
2 ssh连接不是默认端口22
ssh-keygen
scp ~/.ssh/id_rsa.pub username@192.168.20.201:~/home
# 切换到服务器B 终端,在服务器B执行
cat ~/home/id_rsa.pub >> ~/.ssh/authorized_keys
评论已关闭