November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

Categories

November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

SSH password authentication

There are times when you really want to get rid of SSH password authentication, however SSH is VERY picky about permissions etc. I just found out that there’s a tool for that in all Linux boxes!

As promised, the two simple steps:

  1. Create your keypair (assuming you don’t already have it ready) 
    $ ssh-keygen -t rsa

    Make sure NOT to enter a passphrase, or you’ll have to enter that every time you use the keypair!

  2. Copy it over to the server and make all necessary adjustments (create directory, fix permissions, etc) 
    $ ssh-copy-id -i id_rsa.pub user@example.com

    You’ll be prompted for your password, and then notified that you can now try logging into the server.

  3. Enjoy!

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>