生成密钥
# ssh-keygen -t rsa
公钥上传服务器
# ssh-copy-id user@host
编辑本地ssh 配置文件
# vim ~/.ssh/config
配置如下
Host host HostName xxx.xxx.xxx.xxx User root
登陆
ssh host