SSH to VM failed

Asked by KAABACHE Nassim

Hi,
I create my own Cloud, I create a VM.
I can ping but I can't SSH it.
thx for help

test@one-PC:/usr/lib/ltp$ ping 172.16.0.3
PING 172.16.0.3 (172.16.0.3) 56(84) bytes of data.
64 bytes from 172.16.0.3: icmp_req=1 ttl=64 time=0.271 ms
64 bytes from 172.16.0.3: icmp_req=2 ttl=64 time=0.208 ms
^C
--- 172.16.0.3 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1000ms
rtt min/avg/max/mdev = 0.208/0.239/0.271/0.035 ms
test@one-PC:/usr/lib/ltp$ ssh -vvvv 172.16.0.3
OpenSSH_6.0p1 Debian-3ubuntu1, OpenSSL 1.0.1c 10 May 2012
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to 172.16.0.3 [172.16.0.3] port 22.
debug1: connect to address 172.16.0.3 port 22: Connection refused
ssh: connect to host 172.16.0.3 port 22: Connection refused

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Compute (nova) Edit question
Assignee:
No assignee Edit question
Solved by:
KAABACHE Nassim
Solved:
Last query:
Last reply:
Revision history for this message
KAABACHE Nassim (nassim-kaabache) said :
#1

Sorry I write it too quickly.
I manage to create a VM with OpenStack.
I add the rules for ping and ssh on OpenStack.
There is a client SSH on my VM.
But the ping is ok but not the SSH.
I don't have any clue where is the problem, I can send you the nova.conf or all my config s network...
I try with or without RSA key =/

I try this too :
# killall dnsmasq
# service nova-network restart

Can you help me ?

Revision history for this message
GuoHui Liu (guohliu) said :
#2

Did you create security group to allow ssh connect?
example:
nova secgroup-add-rule openpub icmp -1 -1 0.0.0.0/0
nova secgroup-add-rule openpub tcp 22 22 0.0.0.0/0

Revision history for this message
KAABACHE Nassim (nassim-kaabache) said :
#3

yes I add it in the dashboard and in command line, but even without icmp rules I can ping my VM.
Maybe there is a problem of settings, I don't know.

Revision history for this message
GuoHui Liu (guohliu) said :
#4

what is the console output when you ssh to the vm?

Revision history for this message
KAABACHE Nassim (nassim-kaabache) said :
#5

it is this one :
test@one-PC:/usr/lib/ltp$ ssh -vvvv 172.16.0.3
OpenSSH_6.0p1 Debian-3ubuntu1, OpenSSL 1.0.1c 10 May 2012
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to 172.16.0.3 [172.16.0.3] port 22.
debug1: connect to address 172.16.0.3 port 22: Connection refused
ssh: connect to host 172.16.0.3 port 22: Connection refused

Revision history for this message
GuoHui Liu (guohliu) said :
#6

do you create keypair using keypair-add and using that keypair to boot your instance?

Revision history for this message
KAABACHE Nassim (nassim-kaabache) said :
#7

I create the keypair, add it to the VM and try to ssh but it failed and it didn't talk about rsa key.
I go to the VM and the ~/.ssh/authorized_keys is the same as mine.
I try to telnet but it failed too.
I try different port but nothing better.

Revision history for this message
KAABACHE Nassim (nassim-kaabache) said :
#8

Thank you very much it was all my fault...

Revision history for this message
KAABACHE Nassim (nassim-kaabache) said :
#9

There was a ssh client but no ssh server

Revision history for this message
edward (liuqi-edward) said :
#10

hello kaabache

I faced the same question with you. Could you tell which server don't have a ssh server?

Thanks!

Revision history for this message
KAABACHE Nassim (nassim-kaabache) said :
#11

My VM didn't have ssh server on it.

Revision history for this message
edward (liuqi-edward) said :
#12

hi kaabache

Thanks for your reply.

When i create a ubuntu instance , i can't log in it in dashboard. so how do you solve the ssh server problem?

sorry, i am a fresher.

Thanks again!

Revision history for this message
KAABACHE Nassim (nassim-kaabache) said :
#13

Hi Edward,

If you want to log in throw the dashboard, it s a VNC connexion normally and not a ssh connexion. VNC is more about the openstack configuration.

If you want to ssh your server you need to install ssh server on your ubuntu instance. you can install it with an iso that you add as a CD driver. I ve never done that so I can check it.

Regards,

Nassim