`
caizhongda
  • 浏览: 190222 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论

SSh Agent admitted failure to sign using the key

 
阅读更多

现有2台机器

1、服务器192.168.1.112

2、个人机192.168.1.110

要使110无需密码通过ssh登入112

步骤

1、创建密钥

Java代码  收藏代码

   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. 

miao@u32-192-168-1-110:~/.ssh$ ssh-keygen -t rsa

Generating 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、复制公密到服务器

Java代码  收藏代码

   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$  

miao@u32-192-168-1-110:~/.ssh$ scp id_rsa.pub miao@192.168.1.112:/home/miao/.ssh/192.168.1.110
miao@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的信任区域
Java代码  收藏代码

   1. miao@debian-192-168-1-112:~/.ssh$ cat 192.168.1.110 >> authorized_keys 
   2. miao@debian-192-168-1-112:~/.ssh$  

miao@debian-192-168-1-112:~/.ssh$ cat 192.168.1.110 >> authorized_keys
miao@debian-192-168-1-112:~/.ssh$



注: 2,3两步可由命令ssh-copy-id一步到位

Java代码  收藏代码

   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. 

miao@ubuntu-192-168-1-110:~/.ssh$ ssh-copy-id miao@192.168.1.112
Password:
Now try logging into the machine, with "ssh 'miao@192.168.1.112'", and check in:

  .ssh/authorized_keys

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有无运行,若没有

Java代码  收藏代码

   1. miao@u32-192-168-1-110:~/.ssh$ ssh-agent 

miao@u32-192-168-1-110:~/.ssh$ ssh-agent



5、添加id_rsa到ssh-agent

Java代码  收藏代码

   1. miao@u32-192-168-1-110:~/.ssh$ ssh-add id_rsa 
分享到:
评论

相关推荐

    Agent admitted failure to sign using the key 问题解决办法.docx

    SSH 问题解决办法 - Agent admitted failure to sign using the key 在 Ubuntu 中安装 SSH 过程中,可能会遇到 "Agent admitted failure to sign using the key" 的错误信息。这个错误是由于 SSH 客户端无法使用...

    Agent admitted failure to sign using the key 问题解决办法.pdf

    在将公钥添加到 authorized_keys 文件中后,使用命令 `ssh localhost` 时出现 `Agent admitted failure to sign using the key` 的错误信息。 解决办法 为了解决这个问题,需要使用 `ssh-add` 指令将私钥添加到 ...

    Git SSH key 生成教程

    在使用过程中可能会遇到密钥验证失败的问题,如“Agent admitted failure to sign using the key”,此时可以使用“ssh-add”命令手动添加私钥到SSH代理中。 7. Git客户端的下载与安装: 文档中提到Git客户端的下载...

    在VM下hadoop集群搭建.doc

    1. 遇到"Agent admitted failure to sign using the key"错误,使用ssh-add命令将私钥添加到ssh-agent中。 2. 遇到"ssh: connect to host master port 22: No route to host"错误,检查/etc/hosts文件,确保主机名和...

    polycom宝利通视频会议软件3.9 2018

    agent or student or one video conferencing device not assigned to a unique individual, within your company or legally recognized entity that is authorized by you to directly or indirectly use the ...

    介词to后+动名词结构一览.doc

    1. admit to doing sth:承认已经做了某事,如 "He admitted having stolen the money."(他承认偷了钱。) 2. apply to doing sth:适用于做某事,如 "These methods apply to learning English."(这些方法适用于...

    【考研】2022考研英语作文应该避免的病句.doc

    11. 原句:I was admitted to a Key University for which few dared to sign up. 改进:I gained admission to a prestigious university that few dared to apply to. 12. 原句:Luckily, he recognized an ...

    高中英语书面表达经典句子PPT学习教案.pptx

    - "It is universally acknowledged that it pays to spare no effort to achieve our dreams of being admitted to key universities." 普遍认为,为实现进入重点大学的梦想付出努力是有回报的。 4. **结尾表达**...

    r软件数据分析 数据(forestfires)

    In [Cortez and Morais, 2007], the ...(REC) shows that the SVM model predicts more examples within a lower admitted error. In effect, the SVM model predicts better small fires, which are the majority.

    东北师大附中2016高考英语二轮复习 书面表达选看(2)

    The main reason for this preference is the higher chance of being admitted due to the familiarity with the curriculum and examination patterns. Additionally, staying close to home allows them to ...

    The Olympic Games -知识点复习学案.doc

    ② "Luckily, he was admitted to/in a famous university last year." 被大学录取用be admitted to/in。 通过以上分析,学生应该对与奥林匹克运动会相关的英语词汇和"admit"的用法有了更深入的理解,这将有助于...

    高中英语必修二unitPPT课件.pptx

    - `be admitted to/into`:被…接纳,被…录取,例如:"He was admitted to/into the famous university."(他被那所著名的大学录取了)。 - `admit of`:容许,例如:"This matter admits of no delay."(此事...

    英语必修二unit课文知识点PPT课件.pptx

    2. "admit to/into" 表示“让…进入”,可以用于学校、组织等,如:"Being admitted into/to the Olympic Games is the dream of every athlete."(能参加奥运会是每个运动员的梦想。) 3. "admit doing sth." 表示...

    高中阶段常见带介词to的短语归纳如下.doc

    21. **be exposed to**:表示“暴露于/遭受/接触...”,如"The bicycle was exposed to the rain and wind."那辆自行车在风雨中暴露无遗。 22. **be compared to**:用于“被比喻成”,如"Teachers are often ...

    2020年高中英语Module4GreatScientistsSectionⅡIntroduction&ReadingandVo

    - "The key to keeping this country a comfortable and clean place to live in is to control industrial pollution." "the key to + 动名词" 指的是做某事的关键,这里是控制工业污染是保持国家宜居的关键。...

    河北省石家庄市第一中学高中英语 unit4 Astronomy language points教学课件 新人教版必修3

    - "What made the school proud was that more than 90% of the students had been admitted to key universities." 这里"what made the school proud"为主语从句,"that more than 90% of the students had been ...

    英语六级常考翻译集合

    3. **复杂句型**:如“The lecture was so boring that...”中的结果状语从句,以及“The concerned mother thrilled at the news of his son’s having been admitted to the university”中的动名词短语作介词宾语...

    广东省广州市第二中学2016届高三英语一轮复习2语法share高考英语易错介词搭配素材

    例如:"To study effectively, you need to focus your attention on the key points of the lesson." 3. **show respect for**:对...表示尊重。例如:"It's important to show respect for our elders and ...

    人教版高一英语必修二unit2全套课件PPT课件.pptx

    例如:“He was admitted to/into the famous university.”(他被那所著名的大学录取了。) - `admit of`表示“容许”,后面常跟动名词,如:“This matter admits of no delay.”(这件事刻不容缓。) 4. **例句...

    名词性从句汉译英练习.doc

    3. To my delight, Fudan University, which I have always dreamed of, admitted me. 4. The fact that he once came to China thrilled everyone present. 5. Whether he robbed the bank remains to be further ...

Global site tag (gtag.js) - Google Analytics