2

I am trying to access remote server: Here is my ssh command given below-

bitech@hdpedge01:~/.ssh$ ssh techniker@151.252.41.105 -i ~/.ssh/id_rsa -v

I am getting permission denied error:

OpenSSH_6.0p1 Debian-4+deb7u6, OpenSSL 1.0.1t  3 May 2016
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to 151.252.41.105 [151.252.41.105] port 22.
debug1: Connection established.
debug1: identity file /home/bitech/.ssh/id_rsa type -1
debug1: identity file /home/bitech/.ssh/id_rsa-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.8
debug1: match: OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.8 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.0p1 Debian-4+deb7u6
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: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: DSA 28:64:63:b2:91:98:78:db:f9:4f:b3:32:f1:a4:39:27
debug1: Host '151.252.41.105' is known and matches the DSA host key.
debug1: Found key in /home/bitech/.ssh/known_hosts:3
debug1: ssh_dss_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: publickey
debug1: Next authentication method: publickey
debug1: Trying private key: /home/bitech/.ssh/id_rsa
debug1: key_parse_private_pem: PEM_read_PrivateKey failed
debug1: read PEM private key done: type <unknown>
Enter passphrase for key '/home/bitech/.ssh/id_rsa':
debug1: key_parse_private_pem: PEM_read_PrivateKey failed
debug1: read PEM private key done: type <unknown>
Enter passphrase for key '/home/bitech/.ssh/id_rsa':
debug1: key_parse_private_pem: PEM_read_PrivateKey failed
debug1: read PEM private key done: type <unknown>
Enter passphrase for key '/home/bitech/.ssh/id_rsa':
debug1: key_parse_private_pem: PEM_read_PrivateKey failed
debug1: read PEM private key done: type <unknown>
debug1: No more authentication methods to try.
Permission denied (publickey).

I do not understand how to debug this error. I have tried to change the passphrase using ssh-keygen -f id_rsa -p command but it always give me Bad passphrase error.

  • It's unclear what you tried to get this authentication working. I read it twice and wonder if you're trying to configure the wrong machine. Do you have access to the remote server to fix its configuration? – Julie Pelletier Mar 16 '17 at 14:58
1

The errors say that what you are trying to open is not recognized as a private key that could OpenSSH read.

debug1: Trying private key: /home/bitech/.ssh/id_rsa
debug1: key_parse_private_pem: PEM_read_PrivateKey failed
debug1: read PEM private key done: type <unknown>
Enter passphrase for key '/home/bitech/.ssh/id_rsa':

There is a known bug, that will be fixed in the next release. In short, OpenSSH of certain versions represents all errors as a "wrong passphrase", which can be very confusing for users.

How does your key look like? Where did you get that from?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.