配置ssh秘钥登录
ssh-keygen -t rsa
ssh-copy-id root@192.168.2.130
配置ssh config简化登录
Host centos
Port 22
HostName 192.168.2.130
User root
IdentityFile ~/.ssh/id_rsa
IdentitiesOnly yes
使用简化方式登录
ssh centos
ssh-keygen -t rsa
ssh-copy-id root@192.168.2.130
Host centos
Port 22
HostName 192.168.2.130
User root
IdentityFile ~/.ssh/id_rsa
IdentitiesOnly yes
ssh centos