SSH: Difference between revisions
Jump to navigation
Jump to search
Created SSH Keys section with OpenSSH and Puttygen methods for Linux. |
m →Using puttygen: adjusted caps |
||
| Line 8: | Line 8: | ||
chown 600 $hostname*.key | chown 600 $hostname*.key | ||
Then for the user you want to log in as, copy the .pub file's contents to the user's .ssh/authorized_keys file. It also needs to have 600 permissions. | Then for the user you want to log in as, copy the .pub file's contents to the user's .ssh/authorized_keys file. It also needs to have 600 permissions. | ||
==Using | ==Using Puttygen== | ||
===Linux=== | ===Linux=== | ||
Create the key: | Create the key: | ||
Revision as of 21:30, April 4, 2022
SSH Keys
Using OpenSSH
Create a key:
ssh-keygen -t ed25519 -C "Your comment here" -f ~/.ssh/$hostname.key
Or, in RSA format:
ssh-keygen -t rsa -b 4096 -C "Your comment here" -f ~/.ssh/$hostname2.key
Make sure it has safe permissions:
chown 600 $hostname*.key
Then for the user you want to log in as, copy the .pub file's contents to the user's .ssh/authorized_keys file. It also needs to have 600 permissions.
Using Puttygen
Linux
Create the key:
puttygen -t ed25519 -C "Your comment here" -o ~/.ssh/$hostname.ppk
Or, in the RSA format:
puttygen -t rsa -b 4096 -C "Your comment here" -o ~/.ssh/$hostname2.ppk
Either way, the file should have 600 permissions. Print the public key:
puttygen -L ~/.ssh/$hostname.ppk
Then for the user you want to log in as, copy the output to the user's .ssh/authorized_keys file. It also needs to have 600 permissions.