SSH免密码登录并设置别名的方法
1.生成密钥“id_rsa.pub”
ssh-keygen
2.上传公钥到服务器“.ssh/authorized_keys” [核心内容]
ssh-copy-id [user@]hostname
3.创建别名
vim .ssh/config
Host
HostName test
User root
Port 22 1.生成密钥“id_rsa.pub”
ssh-keygen
2.上传公钥到服务器“.ssh/authorized_keys” [核心内容]
ssh-copy-id [user@]hostname
3.创建别名
vim .ssh/config
Host
HostName test
User root
Port 22