Chinaunix首页 | 论坛 | 博客
  • 博客访问: 860494
  • 博文数量: 286
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 1841
  • 用 户 组: 普通用户
  • 注册时间: 2015-05-09 16:26
文章分类

全部博文(286)

文章存档

2016年(38)

2015年(248)

我的朋友

分类: LINUX

2015-07-16 22:59:18

机器1:ubuntu 1404  机器2:openwrt   
实现ubuntu免密码登入openwrt
ubuntu:
点击(此处)折叠或打开
  1. listome-bao@listomebao-computer:~$ ssh-keygen -t rsa
  2. Generating public/private rsa key pair.
  3. Enter file in which to save the key (/home/listome-bao/.ssh/id_rsa):
  4. Enter passphrase (empty for no passphrase):
  5. Enter same passphrase again:
  6. Your identification has been saved in /home/listome-bao/.ssh/id_rsa.
  7. Your public key has been saved in /home/listome-bao/.ssh/id_rsa.pub.
  8. The key fingerprint is:

  1. 生成了id_rsa.pub 将其传到openwrt 的 /etc/dropbear/ 下改成authorized_keys  
         
        即可

之前如果建立 ssh 连接,只要將公钥复制到 ~/.ssh/authorized_keys 就可以利用公钥登入,而不需要建立密码。

现在的 ssh 使用同样的方法会出現错误信息:

Agent admitted failure to sign using the key

解決方法:

使用 ssh-add 指令將私钥加进来(根据个人的密匙命名不同更改 id_rsa)
# ssh-add   ~/.ssh/id_rsa  



    





阅读(5243) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~