SSh problem

asked 2014-02-09 03:12:09 -0600

pachiko gravatar image

Hello, I created an cirros instannce in openstack. I can ping the instance's Ip adress but cant get access it by ssh with the following error: ssh_exchange_identification: Connection closed by remote host

Waiting help, Thank you.

edit retag flag offensive close merge delete


Use ssh verbose and paste the output here, this will provide more details. Just add the `-v` to your SSH CLI invocation: `ssh -v -i key.pem user@host`.

Thomas Orozco gravatar imageThomas Orozco ( 2014-02-11 07:56:12 -0600 )edit

OpenSSH_5.3p1, OpenSSL 1.0.0-fips 29 Mar 2010 debug1: Reading configuration data /etc/ssh/ssh_config debug1: Applying options for * debug1: Connecting to [] port 22. debug1: Connection established. debug1: permanently_set_uid: 0/0 debug1: identity file /root/.ssh/identity type -1 debug1: identity file /root/.ssh/id_rsa type 1 debug1: identity file /root/.ssh/id_dsa type -1 debug1: ssh_exchange_identification: ssh_exchange_identification: Connection closed by remote host

pachiko gravatar imagepachiko ( 2014-02-11 09:20:39 -0600 )edit

Hello, no ideas? the same problem persist.

pachiko gravatar imagepachiko ( 2014-02-13 07:38:17 -0600 )edit

3 answers

Sort by ยป oldest newest most voted

answered 2014-02-11 10:09:20 -0600

Other options is to use password less ssh login using keypair which is far more secure than user/passwords and much quicker for most folks. OpenStack gives you a built in way to create your own keypairs - It will download the private key to you system, and create a public key in the system, it can then be injected into images as they are launched.

edit flag offensive delete link more


Thank you for reply, but the problem is not here, accessing instance with password based method or by key is the same thing , i wrote the result of ssh -v command in an above comment to see what it is going wrong!!

pachiko gravatar imagepachiko ( 2014-02-11 10:37:47 -0600 )edit

answered 2014-02-09 21:25:09 -0600

Gowri gravatar image


Did you add port 22 to default sec group ? And after saving the keypair ,did you do the following ?

chmod 0600 MY_PRIV_KEY.pem

ssh-add MY_PRIV_KEY.pem

and then try ssh -i MY_PRIV_KEY.pem cirros@ .

You can also verify whether the nodes are configured to allow port 22 by checking iptables.

iptables -L -n

edit flag offensive delete link more

answered 2014-02-11 09:13:41 -0600

pachiko gravatar image

I do not use a private key, but a root password to acces the instance.

edit flag offensive delete link more


Yes, i added the port 22 to security default group.

pachiko gravatar imagepachiko ( 2014-02-11 09:19:55 -0600 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2014-02-09 03:12:09 -0600

Seen: 1,346 times

Last updated: Feb 11 '14