Categories

Categories

SSH on your Developer Plan

To use SSH Access on your developer Linux plan, your SSH keys will need to be installed on the server.

SSH keys are used as a more secure authentication method for accessing a server over SSH.

An SSH key consists of a pair of files. One is the private key, which you should never give to anyone. The other is the public key which will go on the server you wish to access.

Whereas passwords are vulnerable to brute force attacks, SSH keys require you to authenticate with a private key which has the corresponding public key on the server.

If you don't have an SSH key already you will need to generate one to access your plan.

Generating SSH keys on your Windows machineYou will most likely be using Putty to connect to the server through SSH (you can get that here: http://www.putty.org/ ).

Putty comes with a built in generator called PuttyGen. You can access this through:Windows Start menu → All Programs → PuTTY→ PuTTYgen.

Click the 'Generate' button to generate your keys. You can then save the Private key and the Public key to your local machine.

Generating SSH keys on your MAC (also works for Linux)

If you're using a MAC, you can generate an SSH key through a 'Terminal'.

1. Open up a terminal window and the following command:ssh-keygen -t rsa

2. Press the ENTER key to accept the default location.

3. The ssh-keygen utility will then prompt you for a passphrase to password protect your key. You can also press Enter if you do not wish to password protect your key.

4. Your public key will be saved in /Users/myname/.ssh/id_rsa.pub. You can read this by running *'myname' should be updated*:cat /Users/myname/.ssh/id_rsa.pub.

Uploading your keys

To upload the public key to the server, you will need to do this through the Plesk portal. You can use the details you have been sent to login directly or you can log in through the General control panel:1. Log into your control panel at https://billing.hostinguk.net/ 2. Once Logged in go to ‘Services’ > ‘My Services’ > Click on your Plesk service.3. Scroll down on the service page and click the 'Login to panel' button which will log you into the Plesk server. 4. Go to the 'Websites & Domains’ tab.

Once logged in click the SSH Keys link over on the right of the screen. Here you can add and remove SSH keys for your plan. Copy and paste the text for your public keys and click the 'Add' button.

Authenticating with your Keys

When connecting over SSH you will need to specify your user. The user can be found under the 'Websites and Domains' tab in your Plesk panel, shown as 'System user:'.

When connecting you will specify the user@server (e.g. huk@plesk75.hostinguk.net).

If you are connecting through a terminal then you can run the command:ssh user@mydomain.com