需求:A机器无密码登录到B机器 ssh
一、A机器执行 ssh-keygen -t rsa ,在~/.ssh/下生成id_rsa 和 id_rsa.pub两个文件,其中id_rsa.pub是公匙 rsa
二、copy id_rsa.pub 到B机器上 ,cat id_rsa.pub > ~/.ssh/authorized_keys ,将公匙内容输入到authorized_keys文件中 权限
三、设置权限 密码
chmod 600 authorized_keys ssh-key
chmod 700 -R .ssh 文件
四、 OKauth