Operating System - Linux
1753946 Members
7364 Online
108811 Solutions
New Discussion юеВ

SSH connection to iLo with publickey authentication failure

 
Adrian Hernandez B
Occasional Advisor

SSH connection to iLo with publickey authentication failure

I've been trying for several days now to configure a workstation to connect to iLo2 using using ssh public key authentication, I want to do this to automate virtual power management into a script.

Here is how the connection fails:

user@localhost:~$ ssh -vi /home/user/.ssh/id_rsa.pub 192.168.1.3
OpenSSH_4.6p1 Debian-5ubuntu0.1, OpenSSL 0.9.8e 23 Feb 2007
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to 192.168.1.3 [192.168.1.3] port 22.
debug1: Connection established.
debug1: identity file /home/user/.ssh/id_rsa.pub type 1
debug1: Remote protocol version 2.0, remote software version mpSSH_0.0.1
debug1: no match: mpSSH_0.0.1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.6p1 Debian-5ubuntu0.1
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: sending SSH2_MSG_KEXDH_INIT
debug1: expecting SSH2_MSG_KEXDH_REPLY
debug1: Host '192.168.1.3' is known and matches the RSA host key.
debug1: Found key in /home/user/.ssh/known_hosts:1
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: password,publickey
debug1: Next authentication method: publickey
debug1: Offering public key: /home/user/.ssh/id_rsa.pub
debug1: Server accepts key: pkalg ssh-rsa blen 277
debug1: PEM_read_PrivateKey failed
debug1: read PEM private key done: type
Enter passphrase for key '/home/user/.ssh/id_rsa.pub':
debug1: No more authentication methods to try.
Permission denied (password,publickey).
user@localhost:~$

I'm creating my keys with:
user@local:~$ ssh-keygen -t rsa -F /home/user/.ssh/known_hosts

I tried the configuration recommended for PuTTY in HP's guide for this process and that worked like a charm, which means that the iLo is indeed authenticating with public key, so I'm thinking it must be some setting that I'm missing with OpenSSH.

Any help would be appreciated.
2 REPLIES 2
Rustio
Occasional Visitor

Re: SSH connection to iLo with publickey authentication failure

sorry for necroposting, but i have the same problem, i have configured the keys, but when i try to connect with:

ssh -v -i path/to/my/key.ppk -o HostKeyAlgorithms=ssh-rsa,ssh-dss -o KexAlgorithms=diffie-hellman-group1-sha1 -o Ciphers=aes128-cbc,3des-cbc -o MACs=hmac-md5,hmac-sha1 usr@ilo

i get:

debug1: Authentications that can continue: password,publickey
debug1: Next authentication method: password
JoeDoe1
New Member

Re: SSH connection to iLo with publickey authentication failure

Hello,

Im facing the same problem on ILO2.

I've added my RSA key to ILO2 using the ILO2 web interface.

But upon connecting:

ssh -o MACs=hmac-sha1 -i ~/.ssh/id_rsa 192.168.1.221 -v
OpenSSH_7.5p1, OpenSSL 1.0.2k-freebsd  26 Jan 2017
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 3: Deprecated option "useroaming"
debug1: Connecting to 192.168.1.221 [192.168.1.221] port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: identity file /home/user/.ssh/id_rsa type 1
debug1: Fssh_key_load_public: No such file or directory
debug1: identity file /home/userid_rsa-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.5 FreeBSD-20170903
debug1: Remote protocol version 2.0, remote software version mpSSH_0.1.4
debug1: no match: mpSSH_0.1.4
debug1: Authenticating to 192.168.1.221:22 as 'user'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: diffie-hellman-group14-sha1
debug1: kex: host key algorithm: ssh-rsa
debug1: kex: server->client cipher: aes128-ctr MAC: hmac-sha1 compression: none
debug1: kex: client->server cipher: aes128-ctr MAC: hmac-sha1 compression: none
debug1: sending SSH2_MSG_KEXDH_INIT
debug1: expecting SSH2_MSG_KEXDH_REPLY
debug1: Server host key: ssh-rsa SHA256:xxxxx.xxxxxxxxxxxx.xxxxxxxxxxx.xxxxxxxx
debug1: skipped DNS lookup for numerical hostname
debug1: Host '192.168.1.221' is known and matches the RSA host key.
debug1: Found key in /home/user/.ssh/known_hosts:4
debug1: rekey after 4294967296 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey after 4294967296 blocks
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: password,publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/user/.ssh/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 279
debug1: Authentications that can continue: password,publickey
debug1: Next authentication method: password
user@192.168.1.221's password:

Greetings