I am wanting to use public keybased authentication with SSH so that I can stop using passwords. So far I have done the following:
I then copied the public key as follows:
in ~/.ssh.
But when I try to login using Putty on a Windows machine it still says:
Am I missing something here? I followed the instructions at:
http://www.freebsd.org/doc/en/books/handbook/openssh.html (under point 14/11/6)
but I must be doing something wrong, can someone help? :e:e:e
PS: I have tried this for the root account and a non root account
Code:
alpha# ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Created directory '/root/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
c7:38:a8:7d:04:d3:0c:de:71:3c:fc:63:42:7e:3e:18 root@mydomain.com
The key's randomart image is:
+--[ RSA 2048]----+
| . .o. |
| . = o= |
| + +o o |
| + oE = |
| . S oB . |
| o . o. o |
| . . . . |
| . |
| |
+-----------------+
I then copied the public key as follows:
Code:
cp id_rsa.pub authorized_keys
in ~/.ssh.
But when I try to login using Putty on a Windows machine it still says:
Code:
login as: myusername
Using keyboard-interactive authentication.
Password:
Am I missing something here? I followed the instructions at:
http://www.freebsd.org/doc/en/books/handbook/openssh.html (under point 14/11/6)
but I must be doing something wrong, can someone help? :e:e:e
PS: I have tried this for the root account and a non root account