Use an SSH-Key instead of SSH Passwort (Windows and Putty)

by Domekologe
0 comment

I know there are many guides, but why not?!

%User% => User you want

Permission Set
%User%/.ssh => 0700
%User%/.ssh/authorized_keys => 0600

Setup Steps

  1. Create an Key with Puttygen

    1. Open Puttygen

    2. Set the Parameters so RSA with 2048 bits

    3. Click on Generate

    4. Move your mouse, until the Generation is finished

    5. Enter a Key Comment (Name of the Key) and enter a password for the key (if you leave the passphrase blank, everyone can use the key)

    6. Save public and private key

    7. Copy the value of the box “Public Key for pasting into OpenSSH authorized_keys file”

    8. Paste the value to %User%/.ssh/authorized_keys in an extra line

  2. Use the Generated Private Key in an SSH Session (for example in Putty)

    1. If you want to save it permanently, open Pageant and add the Private Key into the List.

  3. Change the Service

    1. open /etc/ssh/sshd_config and change the Line “PermitRootLogin yes” to “PermitRootLogin without-password”

    2. Restart the SSHD Service

Leave a Comment