devstack vm instance ssh error message

asked 2019-08-16 09:33:10 -0500

phil111 gravatar image

ssh: connect to host x.x.x.x port 22: Connection on refused

I get this error when i try to ssh from my devstack (using OVN) controller node towards my VM instances. I can ping the IPs but ssh is not successful.

ssh -i OVNkey3.pem ubuntu@x.x.x.x -v OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n 7 Dec 2017 debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 19: Applying options for * debug1: Connecting to x.x.x.x [x.x.x.x] port 22. debug1: Connection established. debug1: key_load_public: No such file or directory debug1: identity file OVNkey3.pem type -1 debug1: key_load_public: No such file or directory debug1: identity file OVNkey3.pem-cert type -1 debug1: Local version string SSH-2.0-OpenSSH_7.6p1 Ubuntu-4ubuntu0.3 ssh_exchange_identification: read: Connection reset by peer

edit retag flag offensive close merge delete

Comments

connection refused normally means that nothing is listening on port 22, but the message at the end of your debug session is connection reset by peer.

I see "no such file or directory"; does OVNkey3.pem exist? Does it have correct permissions?

Bernd Bausch gravatar imageBernd Bausch ( 2019-08-16 10:12:14 -0500 )edit

Hi Bernd. yes OVNkey3 exits and permissions matching chmod 600

phil111 gravatar imagephil111 ( 2019-08-16 10:38:16 -0500 )edit

key_load_public: No such file or directory must refer to the key on the server side (public key). Perhaps the public key could not be loaded from metadata? You should be able to confirm this from the console log, or perhaps you can even log on to the console?

Bernd Bausch gravatar imageBernd Bausch ( 2019-08-16 10:51:13 -0500 )edit

for cirros the console works because there is an assigned password however for the ubuntu vm instance, there is no password so I can only go via ssh.

On the cirros instance, I was trying to check for ssh services but seems the cli is a bit different . I will check both console logs again to confirm

phil111 gravatar imagephil111 ( 2019-08-17 04:29:19 -0500 )edit