Difference between revisions of "Public key authentication"

From Linuxintro
imported>ThorstenStaerk
imported>ThorstenStaerk
(Redirecting to Passwordless logins)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
With Linux, it is possible to log in to a remote computer without having to type a password. You authenticate yourself with your "digital signature" and your public key. Let's say you are ''root'' on computer ''earth'' and want to log in to ''mars''. Start creating a public/private key pair:
+
#REDIRECT [[passwordless logins]]
ssh-keygen -t dsa
 
Generating public/private dsa key pair.
 
Enter file in which to save the key (/root/.ssh/id_dsa):
 
Enter passphrase (empty for no passphrase):
 
Enter same passphrase again:
 
Your identification has been saved in /root/.ssh/id_dsa.
 
Your public key has been saved in /root/.ssh/id_dsa.pub.
 
The key fingerprint is:
 
b7:b4:64:73:ef:4e:8a:df:d2:8c:16:ca:df:08:48:ec ''root''@''earth''
 
copy your public key to ''mars'':
 
scp /root/.ssh/id_dsa.pub root@mars:/root/.ssh/authorized_keys
 
Now you can securely login without having to give your password.
 

Latest revision as of 07:29, 6 April 2009