ssh无密码登入设置
来源:互联网 发布:网络剧在哪个播放器有 编辑:程序博客网 时间:2024/04/29 22:25
http://www.jiangmiao.org/blog/559.html
现有2台机器
1、服务器192.168.1.112
2、个人机192.168.1.110
要使110无需密码通过ssh登入112
步骤
1、创建密钥
miao@u32-192-168-1-110:~/.ssh$ ssh-keygen -t rsaGenerating public/private rsa key pair.Enter passphrase (empty for no passphrase): (忽略)Enter same passphrase again: (忽略)Your identification has been saved in /home/miao/.ssh/id_rsa.Your public key has been saved in /home/miao/.ssh/id_rsa.pub.
2、复制公密到服务器
miao@u32-192-168-1-110:~/.ssh$ scp id_rsa.pub miao@192.168.1.112:/home/miao/.ssh/192.168.1.110miao@192.168.1.112's password: id_rsa.pub 100% 404 0.4KB/s 00:00 miao@u32-192-168-1-110:~/.ssh$
3、添加公密到192.168.112的信任区域
miao@debian-192-168-1-112:~/.ssh$ cat 192.168.1.110 >> authorized_keysmiao@debian-192-168-1-112:~/.ssh$
注: 2,3两步可由命令ssh-copy-id一步到位
miao@ubuntu-192-168-1-110:~/.ssh$ ssh-copy-id miao@192.168.1.112Password:Now try logging into the machine, with "ssh 'miao@192.168.1.112'", and check in: .ssh/authorized_keysto make sure we haven't added extra keys that you weren't expecting.
4、启动ssh-agent
如果ssh 192.168.112返回 Agent admitted failure to sign using the key
ps -Af|grep agent查看有无ssh-agent有无运行,若没有
miao@u32-192-168-1-110:~/.ssh$ ssh-agent
5、添加id_rsa到ssh-agent
miao@u32-192-168-1-110:~/.ssh$ ssh-add id_rsa6、完成
- ssh无密码登入设置
- ssh无密码登入设置
- ssh无密码登入设置
- ssh无密码登入设置
- iOS-ssh无密码登入设置
- iOS-ssh无密码登入设置
- [转]ssh无密码登入设置
- iOS-ssh无密码登入设置
- ssh无密码登入设置
- ssh配置无密码登入详解
- ubuntu中配置ssh无密码登入操作
- centOs 6.5 ssh配置无密码登入
- Spark分布式搭建(3)——ubuntu下ssh无密码登入(设置ssh公钥认证)
- SSH & 免密码登入
- ssh免密码登入
- ssh 免密码登入
- hadoop2.8.2无密码登入
- Linux ssh 免密码登入
- cf258e
- memcached基本教程1——安装和使用memcached
- linux C经典面试题 四
- 学习AS3 getDefinitionByName (献给所有eval发烧友们)
- Matlab中set函数的用法
- ssh无密码登入设置
- static类成员
- Linux用户进程内存泄露
- dojo1.8树组件使用
- 成功创业者必须具备的9个特质
- UVA 11817 Tunnelling the Earth
- 对程序员最具影响的书籍清单 .
- (转)通过Location获取Address的使用!
- Tried to obtain the web lock from a thread解决方法之一