Ask Your Question

ssh not connecting to Ubuntu Server 14.04 instance

asked 2015-11-14 10:23:56 -0500

openstack_single_node_saas gravatar image

Hi Everybody,

Through Devstack, I have installed Openstack on a single node running Ubuntu Server 14.04 I am able to launch an instance on Openstack through pre-loaded image of cirros from dashboard. I can log onto this instance on a wireles LAN from any Linux workstation using the following: ssh -i key-pair.pem cirros@

I have launched another Ubuntu Server 14.04 instance on top of Openstack. I can ping this instance using its floating IP from any linux workstation.

However, when I do: ssh -i key-pair.pem ubuntu-user@ It says "ssh ..... Connection refused: port 22"

I did 'apt-get update' and 'apt-get upgrade' on the top level Ubuntu Do I need to install ssh server on that Ubuntu Or do you think there might be another reason for connection refusal

I would appreciate much if somebody can help me resolve this.

Thanks & best regards,

Hamid Sultan

edit retag flag offensive close merge delete


have you added security group rules to that ubuntu instance. ICMP and SSH rules.

Anand TS gravatar imageAnand TS ( 2015-11-14 19:17:15 -0500 )edit

Hi Anand, Thank you for your message. It turned that by default ssh server is not installed on Ubuntu. So I installed ssh server and it worked. Thank you again for your input.

Best, Hamid Sultan

openstack_single_node_saas gravatar imageopenstack_single_node_saas ( 2015-11-19 11:46:49 -0500 )edit

Hamid, I am facing similar problem and wondering how did you install ssh server if you are not able to login through ssh -i <pem_file> ubuntu@<floating-ip>.

vishalcdac07 gravatar imagevishalcdac07 ( 2017-10-26 08:04:56 -0500 )edit

2 answers

Sort by » oldest newest most voted

answered 2015-11-16 01:38:26 -0500

frz59 gravatar image

updated 2015-11-16 01:40:36 -0500

connecting to ssh by password is disabled by default. you have to provide a ssh-key pair to connect using "ubuntu" user. try ubuntu@IPADDRESS instead of ubuntu-user@IPADDRESS and check firewall rules

edit flag offensive delete link more


Hello Farzad, Thanks for your message. Sorry I did not see it earlier. Yes I am using key-pair and it is connecting. Best regards, Hamid Sultan

openstack_single_node_saas gravatar imageopenstack_single_node_saas ( 2015-11-20 10:48:03 -0500 )edit

Welcome! .

frz59 gravatar imagefrz59 ( 2015-11-22 05:09:48 -0500 )edit

answered 2015-11-15 10:13:57 -0500

Herman Ge gravatar image

updated 2015-11-15 10:15:36 -0500

By default SSH sever is not installed on ubuntu 14.04. Need to install it. Then need modify sshd_config file: /etc/ssh/sshd_config:
PermitRootLogin without-password #comment this line;

PermitRootLogin yes #add this line;

After this, restart ssh service: service ssh restart.

edit flag offensive delete link more


Hello Herman, Thank you for your message which I did not see earlier. Yes your suggestion is absolutely correct. I installed ssh server. Now it works. Warm regards, Hamid Sultan

openstack_single_node_saas gravatar imageopenstack_single_node_saas ( 2015-11-20 10:51:02 -0500 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2015-11-14 10:23:56 -0500

Seen: 998 times

Last updated: Nov 16 '15