1.生成密匙对 。
ssh-keygen -t rsa 什么都不用输入一路回车就好了
其中公共密钥保存在 ~/.ssh/id_rsa.pub
私有密钥保存在 ~/.ssh/id_rsa
然后 chmod 755 ~/.ssh
2.公钥复制到你要访问的机器上去。
scp ~/.ssh/id_rsa.pub remote_host:~/.ssh/authorized_keys
输入密码就好了
1.生成密匙对 。
ssh-keygen -t rsa 什么都不用输入一路回车就好了
其中公共密钥保存在 ~/.ssh/id_rsa.pub
私有密钥保存在 ~/.ssh/id_rsa
然后 chmod 755 ~/.ssh
2.公钥复制到你要访问的机器上去。
scp ~/.ssh/id_rsa.pub remote_host:~/.ssh/authorized_keys
输入密码就好了