INTRODUCTION
Secure Shell (SSH) is a UNIX-based command interface and protocol for securely getting access to a remote computer. SSH is actually a suite of three utilities – slogin, ssh, and scp – that are secure versions of the earlier UNIX utilities, rlogin, rsh, and rcp. SSH commands are encrypted and secure in several ways. Both ends of the client/server connection are authenticated using a digital certificate, and passwords are protected by being encrypted.SSH allows you to connect to your server securely and perform Linux command-line operations.
INSTRUCTIONS
Enable SSH access on the DV and DV Dedicate-Virtual servers, you have several possible SSH users. Choose the appropriate one for your needs.
SSH for FTP user
For domain-specific tasks, you can enable SSH access for the FTP user associated with that domain. This is the best option if you plan to copy or create web-accessible files.
- Log into your Plesk Control Panel.
- Click the Website & Domains tab.
- cp_websites_domains_jpg
- Select Web Hosting Access.
- cp_wd_webhostingaccess_jpg
- Select /bin/bash for SSH access to server with FTP user’s credentials.
- cp_ftp_ssh_jpg
- Click the OK button to save your changes.SSH for root user
For high-level configuration tasks and server administration, you can enable the root user for your server. This user can modify absolutely everything, so make sure you use it wisely. See Enable root access for instructions.
SSH using sudo
For high-level tasks coupled with increased security, you can set up a sudo user instead. This user normally functions as a lower-level user, but can perform the same tasks as root when necessary. See How do I disable SSH access for the root user? for more information.
For all examples that pertain to the root user, a sudo user can do the exact same thing by adding sudo in front of the rest of the command. You will be prompted for the root password, and then the command will execute.
Example root command:
top
Same command for a sudo user:
- sudo top
- Connect to the server
- You will first need to choose an SSH client.Mac OS X includes the SSH client Terminal by default.
- Windows-based Operating Systems do not come with an SSH client by default. We recommend PuTTY. For information, please see: Using SSH in PuTTY (Windows).
- Linux distributions include support for SSH by default as well. Simply start up a terminal.
- Login credentials
- You should use the following information to log into the server via SSH (replace example.com with a domain name that resolves to your server):Server: example.com or your IP address
Username: This depends on which user you chose to enable. The root username is just root. Your domain FTP user or a different sudo user will have a custom name depending on what you typed when you created the user.
Password: This depends on which user you chose to enable. The root and sudo articles above show how to set a password for those users. The domain FTP user will have the same password that you use for FTP.
If you are new to command-line interfaces, you may want to familiarize yourself with some of the commands first.
It is standard to hit “Enter” after each command, to execute it after you finish typing.
PuTTY is a free software application for Windows 95, 98, XP, Vista, and 7 which can be used to make an SSH connection to your server. You can download the application at http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html.
For detailed instructions on using PuTTY, please read our article on SSH in PuTTY (Windows).
Open your SSH client.
Make sure you use your own domain name or IP address. If you want a user other than root, type the other username before the @ symbol.
Type:
- ssh [email protected]
- OR (IP address version)
- ssh [email protected]
- OR (domain FTP user version)
- ssh [email protected]
- If this is your first time connecting to the server from this computer, you will see the following output. Accept the connection by typing “yes.”
The authenticity of host ‘example.com (12.33.45.678)’ can’t be established.
RSA key fingerprint is 3c:6d:5c:99:5d:b5:c6:25:5a:d3:78:8e:d2:f5:7a:01.
Are you sure you want to continue connecting (yes/no)?
yes
- You will now be prompted to enter your password. Please note that you will NOT see your cursor moving, or any characters typed (such as ), when typing your password. This is a standard Terminal security feature. Hit enter.
- You can also copy and paste, using Command+V to paste.
Password:
You are now logged into your server via SSH. You should see output like this:
Last login: Tue Jan 25 15:43:16 2011 from 12.33.45.678
#
(mt) shortcuts
#
To see your Plesk password, type: p
To rebuild your Apache/Web Server configuration, type: web
To rebuild your Qmail/Mail Server configuration, type: mchk
To see your Qmail/Mail Server queue, type: q
To completely restart your Qmail/Mail server, type: r
To connect to your MySQL server as admin, type: my
To get rid of these messages/aliases, edit your /root/.bash_profile
[root@current ~]
#
You can begin typing commands at the prompt.