LAB:: Public Key Based SSH
LAB:: Public Key Based SSH
VM Details
[group01.apnictraining.net] [192.168.30.1]
[group02.apnictraining.net] [192.168.30.2]
......
[group10.apnictraining.net] [192.168.30.10]
[group11.apnictraining.net] [192.168.30.11]
......
[group20.apnictraining.net] [192.168.30.20]
[group21.apnictraining.net] [192.168.30.21]
......
[group30.apnictraining.net] [192.168.30.30]
Software Required:
3. In the Number of bits in a generated key field, specify either 204 or 4096 . Increasing the
bits makes it harder to crack the key by brute-force methods.
6. A private/public key pair has now been generated. Note they key fingerprint.
10. Right-click in the text field labeled Public key for pasting into OpenSSH authorized_keys
file and choose Select All .
11. Right-click again in the same text field and choose Copy .
12. Open a notepad, paste the public key, and save it as .txt file.
ls -lah
mkdir .ssh
chmod 0700 .ssh
touch .ssh/authorized_keys
chmod 0644 .ssh/authorized_keys
sudo vi .ssh/authorized_keys
5. Tap the i key on your keyboard to insert & right-click your mouse to paste.
6. To save and quit: First press Esc key and then type :wq
2. PuTTY's initial window is the Session Category (navigate PuTTY's various categories, along the
left-hand side of the window).
5. Along the left-hand side of the window, select Connection > SSH > Auth
6. Browse your file system and select your saved private key.
7. Return to the Session Category and enter a name for this profile in the Saved Sessions
field (Ex: [email protected] )
8. Click the Save button for the Load, Save or Delete a stored session area.
2. You will NOT be prompted for a password anymore. However, if you had set a passphrase, you will be
asked to enter the passphrase which protects your private key (will prompt you every time you log in),
as shown below:
***END OF EXERCISE***