[ linux 设置 免密 登录到远程主机 ]
ssh-copy-id -i ~/.ssh/id_rsa.pub email@example.com
// 执行完毕后 ,会要求你输入密码,输入密码后会看到如下提示
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/Users/zhangyunfei/.ssh/id_rsa.pub" /usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed /usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys firstname.lastname@example.org's password:
Now try logging into the machine, with: "ssh 'email@example.com'" and check to make sure that only the key(s) you wanted were added.