SSH 连接问题 SSh Agent admitted failure to sign using the
现有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.
- miao@u32-192-168-1-110:~/.ssh$ scp id_rsa.pub [email protected]:/home/miao/.ssh/192.168.1.110
- [email protected]'s password:
- id_rsa.pub 100% 404 0.4KB/s 00:00
- miao@u32-192-168-1-110:~/.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一步到位
- miao@Ubuntu-192-168-1-110:~/.ssh$ ssh-copy-id [email protected]
- Password:
- Now try logging into the machine, with "ssh '[email protected]'", 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$ ps -Af|grep agent
5、若没有 添加id_rsa到ssh-agent
miao@u32-192-168-1-110:~/.ssh$ ssh-agent
相关推荐
82387067 2020-08-15
playis 2020-06-16
GearUpCloud 2020-06-13
xiaoemo0 2020-05-04
阿狸写代码 2020-04-14
拉斯厄尔高福 2020-04-11
小木兮子 2019-11-27
cmsmdn 2019-11-05
MrQuinn 2017-07-23
jacktangj 2019-10-28
86403969 2019-10-23
adeyi 2018-11-24
oDongTianShuiYue 2019-03-18
panmezihuan0 2018-11-24
香帅 2017-04-21
paypalmts 2019-06-30
klb 2019-06-30
Ashes 2019-06-30