解决ssh不能添加已访问的主机到信任列表的问题(Failed to add the host to the list of known hosts)
来源:互联网 发布:步惊云教学软件多少钱 编辑:程序博客网 时间:2024/05/18 02:12
在ssh访问一个服务器的时候第一次会提示签名验证,只要同意之后就会将这个host添加到~/.ssh中的known_hosts中,以后再连接就不会再出现提示了。
原来在ubuntu和freebsd下都没有这个问题。在Gentoo中就有点问题。今天解决了一下,在gentoo-user的mail list中找到了答案。
正常的情况应该是这样的:
可是Gentoo中每次都出现:
根据这位作者的回复:http://www.mail-archive.com/gentoo-user@lists.gentoo.org/msg55719.html
可能是因为使用root用户来移动过home目录,应该修改一下.ssh的用户和权限
可是我看我的/home/rory/.ssh目录的用户和组都是正常的。所以就是因为目录的权限不对。对照作者说的我的.ssh没有x权限。所以我执行了 chmod 700 /home/rory/.ssh 。这样一切就正常了。
原来在ubuntu和freebsd下都没有这个问题。在Gentoo中就有点问题。今天解决了一下,在gentoo-user的mail list中找到了答案。
正常的情况应该是这样的:
rory@gentoo ~ $ ssh xxx.xxx.com
The authenticity of host 'xxx.xxx.com (218.xxx.xxx.xxx)' can't be established.
RSA key fingerprint is 6e:6b:0f:2a:b8:91:3f:c8:f0:39:e4:df:b4:d8:16:6b.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'xxx.xxx.com,218.xxx.xxx.xxx' (RSA) to the list of known hosts.
rory@xxx.xxx.com's password:
可是Gentoo中每次都出现:
rory@gentoo ~ $ ssh xxx.xxx.com
The authenticity of host 'xxx.xxx.com (218.xxx.xxx.xxx)' can't be established.
RSA key fingerprint is 6e:6b:0f:2a:b8:91:3f:c8:f0:39:e4:df:b4:d8:16:6b.
Are you sure you want to continue connecting (yes/no)? yes
Failed to add the host to the list of known hosts
rory@xxx.xxx.com's password:
根据这位作者的回复:http://www.mail-archive.com/gentoo-user@lists.gentoo.org/msg55719.html
可能是因为使用root用户来移动过home目录,应该修改一下.ssh的用户和权限
chown username: /home/username/.sshchown username: /home/username/.ssh/*chmod 700 /home/username/.sshchmod 600 /home/username.ssh/*
可是我看我的/home/rory/.ssh目录的用户和组都是正常的。所以就是因为目录的权限不对。对照作者说的我的.ssh没有x权限。所以我执行了 chmod 700 /home/rory/.ssh 。这样一切就正常了。
- 解决ssh不能添加已访问的主机到信任列表的问题(Failed to add the host to the list of known hosts)
- 解决ssh不能添加已访问的主机到信任列表的问题(Failed to add the host to the list of known hosts) .
- 解决Failed to add the host to the list of known hosts
- Failed to add the host to the list of known hosts 问题解决
- Permanently added the RSA host key for IP address '192.30.252.130' to the list of known hosts.
- Permanently added the RSA host key for IP address '192.30.252.130' to the list of known hosts.
- perMnently added the ecdsa host key for ip address ‘【ip地址】’ to the list of known hosts
- Warning: Permanently added 'git.coding.net,222.186.133.56' (RSA) to the list of known hosts.解决笔记
- Warning:Permanently added ‘git@’ to the list of known hosts permission denied (publickey)
- Github遇到Permanently added the RSA host key for IP address '192.30.252.128' to the list of known host
- Github遇到Permanently added the RSA host key for IP address '192.30.252.128' to the list of known host
- Warning: Permanently added the RSA host key for IP address '192.30.253.113' to the list of known hos
- Warning: Permanently added the RSA host key for IP address '192.30.253.113' to the list of known hos
- Warning: Permanently added the RSA host key for IP address '192.30.255.112' to the list of known hos
- Warning: Permanently added the RSA host key for IP address '192.30.253.113' to the list of known hos
- Warning: Permanently added the RSA host key for IP address '192.30.253.113' to the list of known hos
- ansible错误解决:UNREACHABLE Failed to connect to the host via ssh.
- Failed to connect to the host via ssh: ssh: connect to host 192.68.1.75 port 22: No route to host
- DataGridView 列宽设置
- Intent的若干用法
- Oracle时间日期操作
- 网页上启动QQ聊天
- 我的答案——老男孩培训初级第九期第七次课课前考试题
- 解决ssh不能添加已访问的主机到信任列表的问题(Failed to add the host to the list of known hosts)
- [C#] DirectX 播放声音
- C#根据自己的模板来创建类
- 制作自定义背景Button按钮、自定义形状Button的全攻略
- 记事本
- linux系统安全加固
- Linux 的 sendfile
- Java异常处理总结(荐)
- 用户控件