Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
fester:ssh_setup [2016/06/11 15:48] – [Setting Up an SSH Console] dan | fester:ssh_setup [2016/06/11 16:27] – [Specify SSH Public Key For a User] dan | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Setting Up an SSH Console ====== | ====== Setting Up an SSH Console ====== | ||
- | SSH stands for Secure SHell, and is a secure method to connect to a remote computer over a network. | + | SSH stands for Secure SHell, and is a secure method to connect to a remote computer over a network. |
- | p { margin-bottom: | + | |
The SSH console is a window that has a scrolling function which means you can go back and view the output in the console. You can also select large bodies of text and copy and paste them. This can be particularly useful when trying to get help from someone as they need to see what you have done. It is also useful when compiling data (i.e. SMART test data). | The SSH console is a window that has a scrolling function which means you can go back and view the output in the console. You can also select large bodies of text and copy and paste them. This can be particularly useful when trying to get help from someone as they need to see what you have done. It is also useful when compiling data (i.e. SMART test data). | ||
- | An SSH console is also very secure in two ways. Firstly it requires | + | An SSH console is also very secure in two ways. Firstly it can be configured to require |
===== Configure SSH in FreeNAS ===== | ===== Configure SSH in FreeNAS ===== | ||
+ | |||
+ | Open your web browser and type in the IP address of the FreeNAS web GUI that you noted down earlier (Fester used 192.168.0.58). | ||
+ | |||
+ | The web GUI will present itself and ask for the login details. Enter the username which is **root** (1) and your password (2) and click the “Log In” button (3). | ||
+ | |||
+ | {{: | ||
+ | |||
+ | Now you are logged into FreeNAS. | ||
+ | |||
+ | * Now navigate to the “Services” page (1). | ||
+ | * Click on the tiny spanner icon next to “SSH” (2). | ||
+ | * If you do not want the root user to be able to log in using only a password (i.e., if you want to require a public key, or if you don't want the root user to be able to log in remotely at all), uncheck the “Login as Root with password” tick box (3). | ||
+ | * If you want to require public key authentication, | ||
+ | * Make sure the remaining tick boxes are unchecked (5). | ||
+ | * Now click the “OK” button (6). | ||
+ | |||
+ | {{: | ||
+ | |||
+ | Now turn on the SSH service. | ||
+ | |||
+ | {{: | ||
===== Specify SSH Public Key For a User ===== | ===== Specify SSH Public Key For a User ===== | ||
+ | |||
+ | If you have required public key authentication in the SSH configuration, | ||
+ | |||
+ | {{: | ||
+ | |||
+ | Now select the “root” user account (1) (it will turn blue when selected) and click on the “Modify User” button (2). | ||
+ | |||
+ | {{: | ||
+ | |||
+ | The modify user window should now pop up. Scroll down till you come across the “SSH Public Key:” entry (1). | ||
+ | |||
+ | Now right click in the blank box next to it and paste in the previously copied public key (2). | ||
+ | |||
+ | Now click the “OK” button (3). | ||
+ | |||
+ | {{: | ||
===== Setting up PuTTY in Windows ===== | ===== Setting up PuTTY in Windows ===== | ||
+ | |||
+ | Modern operating systems ship with an SSH client installed. | ||
===== Public Key Authentication in PuTTY ===== | ===== Public Key Authentication in PuTTY ===== | ||
===== Using SSH on a Mac ===== | ===== Using SSH on a Mac ===== | ||
+ | |||
+ | Mac OS X includes an SSH client, but it must be used from the command line. To use it, you'll need to open a terminal window. | ||
+ | |||
+ | {{: | ||
+ | |||
+ | Begin typing " | ||
+ | |||
+ | {{: | ||
+ | |||
+ | Then click on the Terminal icon. You'll see a window like this: | ||
+ | |||
+ | {{: | ||
+ | |||
+ | To connect to a server using SSH, you can simply type | ||
+ | |||
+ | '' | ||
+ | |||
+ | Where " | ||
+ | |||
+ | '' | ||
+ | |||
+ | Or you can use an IP address: | ||
+ | |||
+ | '' | ||
+ | |||
+ | If you have required public key authentication on your FreeNAS server, you'll need to generate a keypair. | ||
+ | |||
+ | '' | ||
+ | |||
+ | ...and simply accept the defaults. | ||
+ | |||
+ | {{: | ||
+ | |||
+ | The system will prompt you for a passphrase; this is optional. | ||
+ | |||
+ | '' | ||
+ | |||
+ | The result will look like this: | ||
+ | |||
+ | '' | ||
+ | |||
+ | Copy this, all on line line, and paste it into your FreeNAS configuration. | ||
===== Using SSH on Linux ===== | ===== Using SSH on Linux ===== | ||
+ | |||
+ | SSH on Linux works just like SSH on a Mac. Follow the instructions above. | ||