配置ssh
vim /etc/ssh/sshd_config
Port 62200
PasswordAuthentication yes
# PermitRootLogin prohibit-password
PermitRootLogin yes #解决root xshell 无法登录
service sshd restart
service sshd status
ssh-keygen
ssh-keygen -f "/root/.ssh/id_rsa" -R 172.30.16.19
ssh-keygen -f "/root/.ssh/known_hosts" -R 172.30.16.19
ssh-copy-id
Copy the public key to remote server.
ssh-copy-id root@192.168.1.87
Login in remote server with no password.
ssh root@192.168.1.87