Passwordless SSH between two machines using certificates

I’ve been meaning to post this somewhere useful for a while now, so here it is.

Assumption

Machine A wants to connect with SSH without passwords (with cert) to Machine B

Method

On Machine A:

ssh-keygen

Make sure you pick no pass phrase.

scp .ssh/id_rsa.pub user@machineb:.ssh/id_rsa.tmp

On Machine B:


cat id_rsa.tmp >> authorized_keys
chmod 600 authorized_keys

Connect as normal from machine A to machine B

3 Comments

Delyan AngelovMarch 27th, 2014 at 17:14

After you generate your keys, you can save some typing by doing:

ssh-copy-id user@machineb

… then just type in your password for the last time, and it will add your public key to the remote account authorized_keys file.

kredit darlehen igelFebruary 17th, 2017 at 04:05

I don’t know why but when you said it would be “Sew Much Fun” I had to giggle…lol nothing like using the pun to it’s fullest…lolol I love the case….I just have to get a Sew Easy! TFS! Hugs, Mary >;

http://www.kreditmittopzinsen.pw/February 17th, 2017 at 04:08

I simply want to say I’m newbie to blogging and seriously liked your website. Probably I’m likely to bookmark your blog . You really come with tremendous writings. Bless you for revealing your website page.

Leave a comment

Your comment