主机一:
ssh-keygen -t rsa
主机二:
cat id_rsa.pub >> .ssh/authorized_keys chmod 600 .ssh/authorized_keys chmod 700 .ssh
如果用户目录无 .ssh目录,需要先创建