How to do — Certificate Based Authentication
1. Go into .ssh directory
3. now do:
return on all of the prompts (i.e. take all the defaults)
It will look like this:
Generating public/private rsa key pair.
Enter file in which to save the key (/home/bart/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/bart/.ssh/id_rsa.
Your public key has been saved in /home/bart/.ssh/id_rsa.pub.
The key fingerprint is:
12:34:56 and so on.
The key’s randomart image is:
+–[ RSA 2048]—-+
4. Enter the following to copy the certificate to the machine:
ssh-copy-id -i ~/.ssh/id_rsa.pub dohnuts
You will get output that looks like:
:~/.ssh$ ssh-copy-id -i ~/.ssh/id_rsa.pub saturn
The authenticity of host ‘[simpsons.com]:12345 ([18.104.22.168]:12345)’ can’t be established.
RSA key fingerprint is ab:59:27:8a.
Are you sure you want to continue connecting (yes/no)? Yes
Warning: Permanently added ‘[simpsons.com]:12345,[22.214.171.124]:12345′ (RSA) to the list of known hosts.
Now try logging into the machine, with “ssh ‘dohnuts’”, and check in:
to make sure we haven’t added extra keys that you weren’t expecting.
5. Now login, using your password to complete.
6. in the future you would type:
Look Ma, no password!