-->

DEVOPSZONES

  • Recent blogs

    AWS : Why SSH key asking me for a passphrase

    AWS : Why SSH key asking me for a passphrase?

    aws ssh key

    I have a public/private key pair. It does not have a passphrase associated with it. Whenever I try to ssh using private key  I get queried for a passphrase, and then of course can't connect up. I've created the .ppk file using puttygen.exe without a passphrase and with a passphrase and then using that key, both of them fails. Any idea how to get around this? Lets figure that out:


    You are trying to use a putty private key (ppk) key format with openssh which doesn't work.... PuTTYgen has an export option for openssh if this is the case.

    Solution 1:

    Try accessing the server with .pem key directly with openssh, it should work.
    [root@hostserver public]# ssh -i /home/centos/manastri.pem  -l centos 10.0.5.135
    [centos@ip-10-0-5-135 ~]$

    Resetting the .pem keys pass-phrase using ssh-keygen, like this
    [root@hostserver public]# ssh-keygen -f /home/centos/manastri.pem -p
    Enter new passphrase (empty for no passphrase):
    Enter same passphrase again:
    Your identification has been saved with the new passphrase.

    Solution 2:

    Resetting the .ppk keys pass-phrase using ssh-keygen, like this
    [root@hostserver public]# ssh-keygen -f /home/centos/manastri.ppk -p
    Enter old passphrase:
    [root@hostserver public]#


    For more information, try connecting using a verbose output, specifying your public key explicitly output:

    $ ssh host -i  /home/centos/manastri.pem  -vvv


    No comments