Welcome 微信登录

首页 / 操作系统 / Linux / SSH 连接问题 SSh Agent admitted failure to sign using the key

现有2台机器1、服务器192.168.1.1122、个人机192.168.1.110要使110无需密码通过ssh登入112步骤1、创建密钥
  1. miao@u32-192-168-1-110:~/.ssh$ ssh-keygen -t rsa  
  2.   
  3. Generating public/private rsa key pair.  
  4. Enter passphrase (empty for no passphrase): (忽略)  
  5. Enter same passphrase again: (忽略)  
  6. Your identification has been saved in /home/miao/.ssh/id_rsa.  
  7. Your public key has been saved in /home/miao/.ssh/id_rsa.pub.  
2、复制公密到www.linuxidc.com服务器 
  1. miao@u32-192-168-1-110:~/.ssh$ scp id_rsa.pub miao@192.168.1.112:/home/miao/.ssh/192.168.1.110  
  2. miao@192.168.1.112"s password:   
  3. id_rsa.pub                                                                   100%  404     0.4KB/s   00:00      
  4. miao@u32-192-168-1-110:~/.ssh$   
3、添加公密到192.168.112的信任区域 
view plain
  1. miao@debian-192-168-1-112:~/.ssh$ cat 192.168.1.110 >> authorized_keys  
  2. miao@debian-192-168-1-112:~/.ssh$   

注: 2,3两步可由命令ssh-copy-id一步到位 
view plain
  1. miao@Ubuntu-192-168-1-110:~/.ssh$ ssh-copy-id miao@192.168.1.112  
  2. Password:  
  3. Now try logging into the machine, with "ssh "miao@192.168.1.112"", and check in:  
  4.   
  5.   .ssh/authorized_keys  
  6.   
  7. to 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$ ps -Af|grep agent5、若没有 添加id_rsa到ssh-agentmiao@u32-192-168-1-110:~/.ssh$ ssh-agentLinux 下编译安装ACE时遇到的问题及解决关于/etc/host,主机名和ip配置文件相关资讯      SSH 
  • SSH/SSL 源码编译安装简易操作说明  (今 07:03)
  • Mac使用ssh出现permission denied(  (03月23日)
  • Mac OS X下配置远程Linux 服务器  (12/22/2015 15:21:41)
  • Teleport:面向集群及团队的 SSH  (04月11日)
  • 如何在 CentOS / RHEL 上设置 SSH   (01月18日)
  • SSH相互信任配置  (12/20/2015 19:58:17)
本文评论 查看全部评论 (0)
表情: 姓名: 字数

版权所有©石家庄振强科技有限公司2024 冀ICP备08103738号-5 网站地图