1. 本机生成秘钥
$ ssh-keygen -t rsa
2. copy秘钥到远程机 ,公钥自动添加到~/.ssh/authorized_keys中
$ ssh-copy-id -i ~/.ssh/id_rsa.pub root@172.17.0.1
1. 本机生成秘钥
$ ssh-keygen -t rsa
2. copy秘钥到远程机 ,公钥自动添加到~/.ssh/authorized_keys中
$ ssh-copy-id -i ~/.ssh/id_rsa.pub root@172.17.0.1