Generate key:
ssh-keygen -t rsa -b 4096 |
Generating public/private rsa key pair.
Enter file in which to save the key (/home/uzza/.ssh/id_rsa): your_key_name
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in your_key_name.
Your public key has been saved in your_key_name.pub.
The key fingerprint is:
30:c4:21:b3:2d:33:f7:00:f2:7b:24:1b:18:29:2c:31 uzza@Uzza-mint
The key's randomart image is:
+--[ RSA 4096]----+
|E.o.+.o. |
|oo.= B. |
|... O B |
| @ = |
| o . S |
| . |
| |
| |
| |
+-----------------+
Set permissions to the .ssh folder on the server
chmod 700 ~/.ssh
chmod 600 ~/.ssh/* |
Copy key on the server:
ssh-copy-id login.domain.com |
New row will be added to the ~/.ssh/authorized_keys
Login to the server without specifying password: