现有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 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、复制公密到服务器
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的信任区域
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一步到位
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有无运行,若没有
miao@u32-192-168-1-110:~/.ssh$ ssh-agent
5、添加id_rsa到ssh-agent
miao@u32-192-168-1-110:~/.ssh$ ssh-add id_rsa
分享到:
相关推荐
SSH 问题解决办法 - Agent admitted failure to sign using the key 在 Ubuntu 中安装 SSH 过程中,可能会遇到 "Agent admitted failure to sign using the key" 的错误信息。这个错误是由于 SSH 客户端无法使用...
在将公钥添加到 authorized_keys 文件中后,使用命令 `ssh localhost` 时出现 `Agent admitted failure to sign using the key` 的错误信息。 解决办法 为了解决这个问题,需要使用 `ssh-add` 指令将私钥添加到 ...
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文件,确保主机名和...
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 ...
1. admit to doing sth:承认已经做了某事,如 "He admitted having stolen the money."(他承认偷了钱。) 2. apply to doing sth:适用于做某事,如 "These methods apply to learning English."(这些方法适用于...
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 ...
- "It is universally acknowledged that it pays to spare no effort to achieve our dreams of being admitted to key universities." 普遍认为,为实现进入重点大学的梦想付出努力是有回报的。 4. **结尾表达**...
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.
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 ...
② "Luckily, he was admitted to/in a famous university last year." 被大学录取用be admitted to/in。 通过以上分析,学生应该对与奥林匹克运动会相关的英语词汇和"admit"的用法有了更深入的理解,这将有助于...
- `be admitted to/into`:被…接纳,被…录取,例如:"He was admitted to/into the famous university."(他被那所著名的大学录取了)。 - `admit of`:容许,例如:"This matter admits of no delay."(此事...
2. "admit to/into" 表示“让…进入”,可以用于学校、组织等,如:"Being admitted into/to the Olympic Games is the dream of every athlete."(能参加奥运会是每个运动员的梦想。) 3. "admit doing sth." 表示...
21. **be exposed to**:表示“暴露于/遭受/接触...”,如"The bicycle was exposed to the rain and wind."那辆自行车在风雨中暴露无遗。 22. **be compared to**:用于“被比喻成”,如"Teachers are often ...
- "The key to keeping this country a comfortable and clean place to live in is to control industrial pollution." "the key to + 动名词" 指的是做某事的关键,这里是控制工业污染是保持国家宜居的关键。...
- "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”中的动名词短语作介词宾语...
例如:"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 ...
例如:“He was admitted to/into the famous university.”(他被那所著名的大学录取了。) - `admit of`表示“容许”,后面常跟动名词,如:“This matter admits of no delay.”(这件事刻不容缓。) 4. **例句...
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 ...