2

So I've gone ahead and generated a Key using Puttygen. From there I've also done the following steps:

  • Generated a Key
  • Copied the Public Key string.
  • Logged onto the pi through SCP
  • Copied the public Key string into authorized keys.
  • tried logging into the Pi from a seperate Pi using the Private key.
  • ssh -i Open_Sesame_Key.ppk [email protected]

I am getting the following verbose output:

pi@raspberrypi:~ $ ssh -i Open_Sesame_Key.ppk [email protected] -v  
OpenSSH_6.7p1 Raspbian-5+deb8u2, 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 10.0.0.12 [10.0.0.12] port 22.  
debug1: Connection established.  
debug1: key_load_public: No such file or directory  
debug1: identity file Open_Sesame_Key.ppk type -1  
debug1: key_load_public: No such file or directory  
debug1: identity file Open_Sesame_Key.ppk-cert type -1  
debug1: Enabling compatibility mode for protocol 2.0  
debug1: Local version string SSH-2.0-OpenSSH_6.7p1 Raspbian-5+deb8u2  
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.0p1   Debian-4+deb7u3
debug1: match: OpenSSH_6.0p1 Debian-4+deb7u3 pat OpenSSH* compat 0x04000000  
debug1: SSH2_MSG_KEXINIT sent  
debug1: SSH2_MSG_KEXINIT received  
debug1: kex: server->client aes128-ctr [email protected] none  
debug1: kex: client->server aes128-ctr [email protected] none  
debug1: sending SSH2_MSG_KEX_ECDH_INIT  
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY  
debug1: Server host key: ECDSA fe:ed:85:98:fa:67:67:17:99:d2:8f:07:18:b9:d6:2d  
debug1: Host '10.0.0.12' is known and matches the ECDSA host key.  
debug1: Found key in /home/pi/.ssh/known_hosts:1  
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,password  
debug1: Next authentication method: publickey  
debug1: Trying private key: Open_Sesame_Key.ppk  
debug1: key_load_private_type: incorrect passphrase supplied to decrypt private   key
Enter passphrase for key 'Open_Sesame_Key.ppk':**

There was no passphrase entered in the puttygen field but yet it claiming I have an incorrect passphrase where i never even set one up. The passphrase field was blank so what would cause this to be requesting a passphrase?

1
  • i had a similar issue once, when i saved the public key as private key. can you load the key again in puttygen? There should be no entry for the passphrase. Commented Jul 6, 2016 at 2:41

2 Answers 2

1

Generated a Key

From the log you are using Open_Sesame_Key.ppk key, which is in PuTTY format and it is not understand by openssh (commandline ssh).

You either generate a new key using ssh-keygen or convert the existing key using PuTTYgen as described on SO: In short:

  • Load your private key into PuTTYgen
  • Go to Conversions -> Export OpenSSH and export your key as Open_Sesame_Key.key

Then you should be able to connect (if you put the public key correctly to the server) with

ssh -i Open_Sesame_Key.key [email protected]
3
  • putty ppk works without conversion. only the public key should be in the OpenSSH form for the authorized_keys. Commented Jul 6, 2016 at 17:56
  • @JoePlatano what makes you think so?
    – Jakuje
    Commented Jul 6, 2016 at 17:57
  • i read over the fact that the private key is used on rasperry to ssh to another raspberry. after see the usage of puttygen, it was clear for me the private key should be used from a windows. i was wrong Commented Jul 7, 2016 at 2:16
0

The public key need to be in openssh format. If you can connect to your pi with user/pass, edit the authorized keys file; delete the old key and insert the keystring from putty genenter image description here

Make sure the public key is only one line!

That information is from this blog post (can be translated to english)

2
  • OpenSSH does not support PPK format of keys. Your post is only about PuTTY, but the question is about standard command-line ssh which support keys in PEM and openssh format only.
    – Jakuje
    Commented Jul 6, 2016 at 18:42
  • @Jakuje okay that's true! i read over that point. Then the private key that is generated on a windows system should be converted. or better a key should be generated directly on the raspberry :) should i delete my awnser? Commented Jul 7, 2016 at 2:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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