输入命令: ssh-copy-id user@host
更多ssh-copy-id [-f] [-n] [-i identity file] [-p port] [-o ssh_option] [user@]hostname示例
ssh-copy-id user@host # 简单用法 ssh -i ~/.ssh/mykey user@host # 指定新的公钥第二步
输入服务器密码
成功!
测试ssh user@host
此时应当是不用输入密码可以登录了!
参考更多:https://www.ssh.com/academy/ssh/copy-id



