1. 生成KEY
ssh-keygen -t dsa
2. 进入.ssh目录
cd .ssh/
3. 重命名key
cp id_dsa.pub authorized_keys
4. 推出.ssh目录
cd ..
5. Copy 目录.ssh到目标机器的$HOME目录
scp -r .ssh/ jliu@10.10.10.10:/~
6. Test:
ssh 10.10.10.10
如果不成功,请查看此文件:
tail -f /var/log/secure
For ubuntu16.0.4 ,please follow the following link:
阅读(623) | 评论(0) | 转发(0) |