0

In Openstack, I can spawn ubuntu and fedora images and ssh into them. But when I am trying the same with Centos image (6.5 or 7), then my key is refused (or even ignored) and I am proposed to use enter a password. It seems that ssh key injection doesn't work with Centos images (I tried different ones).

Any idea where I should investigate?

Here is the output of ssh command with verbose option:

debug1: Connection established.
debug1: identity file /c/Users/bastien/.ssh/id_rsa_bastien type 1
debug1: identity file /c/Users/bastien/.ssh/id_rsa_bastien-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.6.1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3
debug1: match: OpenSSH_5.3 pat OpenSSH_5* compat 0x0c000000
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<3072<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Server host key: RSA 2b:6c:50:28:d0:1c:8b:50:c6:53:75:6f:bb:aa:6e:a7
debug1: Host '37.59.242.188' is known and matches the RSA host key.
debug1: Found key in /c/Users/bastien/.ssh/known_hosts:13
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /c/Users/bastien/.ssh/id_rsa_bastien
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Next authentication method: password
030
  • 5,901
  • 13
  • 68
  • 110
curuba
  • 123
  • 1
  • 6
  • So you are connecting at the TCP level, there is some issue with authenticating in ssh. I'd double check the permissions on the keys and their parent directories. Then look at the logs for sshd on the server. – chicks Dec 08 '14 at 19:56
  • Thank you for your answer but the problem is that I can't access to the server as password login is deactivated. – curuba Dec 08 '14 at 21:38
  • The server logs should tell you why your keys are getting rejected. Did you check the permissions on the key files and the parent directories? – chicks Dec 09 '14 at 00:54
  • In the boot log (from horizon) it doesn't say it is rejected (nor accepted by the way). And again, I can't look at key permissions as I can't ssh to the server nor connect through password (disabled). – curuba Dec 09 '14 at 14:11
  • I am facing the same issue with CentOS cloud image with openstack. I can't ssh in the VM using key. It always prompts for password. Have you figured out the solution? Thanks – Haris Tanvir Feb 06 '16 at 20:32
  • As I mentioned below this had been corrected by OVH themselves. I can't give you more information. – curuba Feb 08 '16 at 08:48

1 Answers1

0

I am working with the beta of Openstack as a Service provided by OVH. They have identified the issue and it is corrected : Non conform request of Redhat based systems where not taken into consideration.

Everything is working fine now!

curuba
  • 123
  • 1
  • 6