Connecting via SSH

From OCS Support Wiki

Jump to: navigation, search

[edit] Introduction

This guide will show you how to connect via SSH.

[edit] Linux and MacOS X

Connecting via SSH to your account in Linux or on a Mac is easy! Simply open up a console and type:

ssh user@domain.com

Where user is your cPanel/Webmin/FTP username and domain.com is your domain name.

The first time you connect you may receive a warning about the authenticity of the host not being able to be established. This is normal the first time and typing yes will confirm the new fingerprint and proceed with the connection. You should not get this again.

If you put a private key file in ~/.ssh/id_dsa, you will not be prompted for a password if you don't have the key passphrase protected. If you want to use a different keyfile than id_dsa (or, for example, you have multiple private keys), you can use:

ssh user@domain.com -i ~/path/to/key

In this example, replace /path/to/key with the location of your keyfile.

Make sure that the keyfile has 0600 (or -rw-------) permissions.

[edit] Windows

Windows has several SSH clients available for use, but the one we recommend (and is free) is PuTTY. You can download PuTTY from http://www.chiark.greenend.org.uk/~sgtatham/putty/. We recommend obtaining the Windows-like installer version, as it installs other tools that are helpful, particularly in the management of private keys.

Once you've installed PuTTY, launch it. You will see the following dialog:

image:putty-1.png

In the Host Name text box, type user@domain.com (where user is your username and domain.com is your domain name) and click Open at the bottom. You will be prompted to approve the host signature once, then you will be prompted for your password. Once you enter it successfully, you'll be logged in.

To use an SSH key, click on the "Auth" section under the "SSH" menu on the side and select the PPK file you generated from the private key. You can now save a profile (by typing a name, for example, the domain name of your site and clicking "Save") so you won't have to go through this each time you want to connect via SSH.