[[fester:ssh_setup]]

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Last revisionBoth sides next revision
fester:ssh_setup [2016/06/11 16:27] – [Specify SSH Public Key For a User] danfester:ssh_setup [2017/06/29 11:41] – [Public Key Authentication in PuTTY] dan
Line 53: Line 53:
  
 ===== Public Key Authentication in PuTTY ===== ===== Public Key Authentication in PuTTY =====
 +
 +Switch on and boot up a personal computer that is part of your private network (if you use it to connect to the internet then this will probably work).
 +
 +Download PuTTY and PuTTYgen to your personal computer (not the server).
 +
 +Install PuTTy and PuTTYgen under an administrator’s account or right click on their respective installation programs and run as an administrator.
 +
 +==== Generating the keypair ====
 +
 +When installed run PuTTYgen under an administrator’s account or right click on the program and run as an administrator.
 +
 +When the PuTTYgen window appears check “SSH-2 RSA” is selected (1), if it isn’t select it.
 +
 +Next check the “Number of bits in a generated key:” is set to 2048 (2).
 +
 +Now click the “Generate” button (3).
 +
 +{{:fester:18ffc8b3f1e27ef37341321c53be2579.png}}
 +
 +Now move your mouse in a random way within the box labelled “Key” (1) in PuTTYgen until the green bar fills up (2).
 +
 +{{:fester:313e3f2dee8179c9f6075fbdbc697226.png}}
 +
 +When the green bar is full the key will be generated and a new screen will appear.
 +
 +In the “Key comment” text box (1) type a comment which will help you identify the key.
 +
 +Now type in a password for the private key in the “Key passphrase” text box (2), remember it as this will be needed later (Fester just used **test** again).
 +
 +Retype the password into the “Confirm passphrase” text box (3).
 +
 +Now save the private key by clicking on the “Save private key” button (4).
 +
 +An additional window will pop up, navigate to where you would like to save the key, give it a name (5) and click the “Save” button (6). Save it somewhere convenient as this will be needed soon.
 +
 +Now right click in the “Public key for pasting into OpenSSH authorized_keys file:” window (7) and from the pop up submenu chose “Select All” (8).
 +
 +The text within this window should become highlighted. Now right click again in this window as you did a moment ago and from the pop up submenu this time select “Copy”.
 +
 +{{:fester:624d5ddaee04c599cc9d7a8a3aef67df.png}}
 +
 +{{:fester:a305a7a81bbd1bf1b9b12a4cdd9bf082.png}}
 +
 +==== Configuring the connection ====
 +
 +Now run PuTTY under an administrator’s account or right click on it and run as an administrator.
 +
 +In the “Host Name or (IP address)” box (1) type in the IP address of the FreeNAS web GUI (Fester’s was 192.168.0.58).
 +
 +Check the port number in the “Port” box (2) is set to 22.
 +
 +The “Connection type:” should be set to SSH (3).
 +
 +Now in the “Category” window click the small plus symbol “+” next to SSH (4). This should open up this section to reveal subcategories.
 +
 +Then click on “Auth” (5), not the “+” sign but the actual text itself.
 +
 +{{:fester:682b107a46081e78692b0d0a56b58a63.png}}
 +
 +This should take you to a different screen.
 +
 +On this screen click the “Browse” (1) button next to the “private key file for authentication:” (2).
 +
 +{{:fester:75a6170bf5395d095a4a523c99a94746.png}}
 +
 +This will bring up a window in which you can load in the private key into PuTTY. Navigate to where you stored the private key, click on it and then click the “Open” button.
 +
 +{{:fester:937aa3d832bb41ca7dbd57d8c83a7fcc.png}}
 +
 +With the key now loaded in, go back to the “Session” category in the “Category” window (1).
 +
 +It is possible to save the settings of this session. This is a good idea because otherwise we would need to re-enter all the details each time we wanted to start a session in PuTTY.
 +
 +In the “Saved Sessions” box (2) type a good name for the session (Fester called it “HDD Validation SSH”).
 +
 +Now click on the “Save” button (3). The saved session should now appear in the window to the left of this (4).
 +
 +Now click on the “Open” button (5) to start the session (have the password you created in PuTTYgen standing by).
 +
 +{{:fester:855b55319b9478882150ad7d77282212.png}}
 +
 +A PuTTY security alert window should now open. It will show the server’s RSA2 key fingerprint and will ask if you trust this host before allowing the connection. Click the “Yes” button.
 +
 +{{:fester:5fccef248c0ccad4d3cb3b950af3da65.png}}
 +
  
 ===== Using SSH on a Mac ===== ===== Using SSH on a Mac =====
  • fester/ssh_setup.txt
  • Last modified: 2017/06/29 11:42
  • by dan