1. 在client端使用ssh-keygen生成, public & private key
$ ssh-keygen
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Note: When it asks you to enter the passphrase just press enter key, and do not give any password here
2. 使用ssh-copy-id copy public key (id_rsa.pub )到server端
ssh-copy-id -i ~/.ssh/id_rsa.pub 192.168.200.10
Note: The above will ask the password for your account on the remote host, and copy the public key automatically to the appropriate location. If ssh-copy-id doesn’t work for you, use the method we discussed earlier to setup ssh password less login.
3. 可以实现自动远程登陆

1087

被折叠的 条评论
为什么被折叠?



