Ping works but cannot SSH the Instance/Stack
I am facing a little issue while sshing to the stack that i have launched successfully. I have launched a stack with the key named "heat_key" and changed its permissions by the command
chmod 600 heat_key
But when I try to ssh to the stack using its IP it gives the following error.
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
I am able to ping the same IP but unable to ssh. i can obtain a list of keys through nova using
nova keypair-list
which enlists the key i have made.
The error is related to keys. i guess the keys are not matching or there is some other issue. Any Help would be appreciated!!
What is an exact ssh command ?
ssh -i heat_key user@X.X.X.X where user is ec2-user and X.X.X.X denotes the IP assigned to the instance
The authenticity of host '10.0.0.6 (10.0.0.6)' can't be established. RSA key fingerprint is fe:5b:c6:a0:5a:87:ed:e6:a3:19:84:88:45:90:cf:f5. Are you sure you want to continue connecting (yes/no)? yes
so when i type in YES the above stated error occurs.. means something is wrong with the keys.
Try
$ nova keypair-add oskey25 > oskey25.priv
$ chmod 600 oskey25.priv
Launch instance with oskey25
i did the same process for heat_key. I repeated the process that you mentioned. But this time the stack made in not even pingable. i cannot ping the new stack. Its IP is 10.0.0.11. so if i cannot ping it, i cannot ssh it. ssh -i oskey25.priv ec2-user@10.0.0.11 ssh: connect to host 10.0.0.11 port 22: No route to host