Linux免密码登录
- yeniugo
- 1月, 26, 2016
- linux
- No Comments
1.生成公钥
ssh-keygen -t rsa
2.拷贝到目标服务器
scp .ssh/id_rsa.pub [email protected]
执行写入信任目录
cat id_rsa.pub >> .ssh/authorized_keys
如果这里没有,ssh目录,手动创建
mkdir .ssh
设置目录的权限
chmod 700 .ssh
chmod 600 .ssh/authorized_keys
3.测试
ssh [email protected]
无需密码,省了很多时间