Authentication 宋承宪;未能将主机添加到已知主机列表中";Openshift
我尝试使用Authentication 宋承宪;未能将主机添加到已知主机列表中";Openshift,authentication,ssh,key,openshift,Authentication,Ssh,Key,Openshift,我尝试使用ssh命令连接到另一个远程主机 ssh -p 21098 -i $OPENSHIFT_DATA_DIR/.ssh/host_key user@domain.com The authenticity of host '[domain.com]:21098 ([124.219.148.93]:21098)' can't be established. RSA key fingerprint is 12:15:79:55:c6:2a:66:1e:82:94:da:19:e1:ca:2
ssh
命令连接到另一个远程主机
ssh -p 21098 -i $OPENSHIFT_DATA_DIR/.ssh/host_key user@domain.com
The authenticity of host '[domain.com]:21098 ([124.219.148.93]:21098)' can't be established.
RSA key fingerprint is 12:15:79:55:c6:2a:66:1e:82:94:da:19:e1:ca:21:3d.
Are you sure you want to continue connecting (yes/no)?yes
Failed to add the host to the list of known hosts (/var/lib/openshift/541b685c5973cae7bbf006f4/.ssh/known_hosts).
Connection closed by 124.219.148.93
我想我们没有访问
home/.ssh
的权限。那么如何解决这个问题呢?可以在命令行上将选项传递给SSH,如下所示:
ssh-o UserKnownHostsFile=/tmp/known\u host\u file-p 21098-i$OPENSHIFT\u DATA\u DIR/.ssh/host\u keyuser@domain.com
以下是相关答案:此答案正确,有助于消除错误并澄清问题;但是,这不是连接关闭的原因。例如,我的问题是远程站点中的./ssh/authorized.key权限不正确。