You can connect to the web server via SSH.
Creating an SSH key
If you do not already have a key you will need to create one.
Mac users
- Open Terminal
- Type the command
ssh-keygen -t rsa
- You will be prompted to enter a save location for the key. Hit Enter to use the default location. This will generate and save the Key in your computer’s .ssh folder which is hidden/and invisible in Finder by default.
- You may be asked to enter a
passphrase
This is optional. You can skip it by hitting Enter to leave it blank. - If you already have an SSH key for your computer, you will recieve a prompt that one already exists and asking if you want to overwrite the existing one. Select
no
in this situation.
Windows users
See the instructions written here.
Adding the SSH Key to an existing Server
SSH Key must be added to the server via SSH.
- Open Terminal
-
Log in as root to the desired server. For example:
ssh root@XXX.XXX.XXX.XXX
Enter the root user password when prompted.
-
Change directory to
.ssh
with the commandcd .ssh
-
Edit the authorized_keys file with the command
nano authorized_keys
The file will open in the Nano editor.
-
Paste the new key into the last line of the file.
-
Press Ctrl-X to exit. You will be prompted to save the file you just edited.
-
Type Y to signify Yes to the save prompt.
-
Type Enter to save with the existing file name.
-
You’re done. Type exit or close the terminal window. The person will now be able to connect with SSH without the need for a password.