A机(1)路径注意下(/root/.ssh/)

ssh-keygen -t rsa -P '' -f /root/.ssh/id_rsa

cat /root/.ssh/id_rsa.pub >> /root/.ssh/authorized_keys

scp /root/.ssh/id_rsa.pub skinglzw3@192.168.128.132:/home/skinglzw3/


B机

cat ./id_rsa.pub >> /root/.ssh/authorized_keys


ubuntu无密码登录_ubuntu