一键登录远端服务器

Posted by Jesse' Notes on February 5, 2017
1
2
cd .ssh
vi config
1
2
3
4
Host myali
HostName myali
User root
IdentitiesOnly yes

生成秘钥

1
ssh-keygen

复制秘钥到远程服务器

1
ssh-copy-id -i ~/.ssh/id_rsa.pub myali

重新登录

1
ssh myali

登录成功