免密登陆SSH
服务器:linux
客户端:linux/macos/windows
Linux/Macos
ssh-keygen -t rsa
ssh-copy-id [your remote user name here]@[you remote server ip here]
eg:
ssh-copy-id zhangsan@11.11.11.11
Windows
ssh-keygen -t rsa
scp -r [id_rsa.pub path generate in the first step] [you remote user name here]@[your remote server ip here]:~/.ssh/authorized_keys
eg:
scp -r C:\Users\zhangsan/.ssh/id_rsa.pub zhangsan@11.11.11.11:~/.ssh/authorized_keys