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 [email protected]:/home/skinglzw3/
B机
cat ./id_rsa.pub >> /root/.ssh/authorized_keys
时间: 2024-09-30 01:59:48