SSH "Failed to add host to the list of known hosts" Openshift

I tried using the command ssh

to connect to a different remote host.

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

      

I believe that we do not have access to home/.ssh

. So how do you fix this problem?

+3


source to share


1 answer


You can pass parameters to SSH on the command line, for example:

ssh -o UserKnownHostsFile=/tmp/known_host_file -p 21098 -i $OPENSHIFT_DATA_DIR/.ssh/host_key user@domain.com



Here is the answer to this question: ssh use known_hosts besides $ HOME / .ssh / known_hosts

+2


source







All Articles