Support / KnowledgeBase

 
Search the KnowledgeBase Search

Connecting via SSH to your server

  • Applies to: (dv) 4.0, (ve), DV, DV Developer, Grid

  • Difficulty: Medium

  • Time needed: 20 minutes

  • Tools needed: AccountCenter access

 
  • Applies to: Grid
    • Difficulty: Medium
    • Time: 20
    • Tools needed: Account Center access, SSH enabled
  • Applies to: Premium WordPress
    • Difficulty: Medium
    • Time: 20
    • Tools needed: Account Center access
  • Applies to: DV
    • Difficulty: Medium
    • Time: 20
    • Tools needed: Account Center access, SSH enabled
  • Applies to: DV Developer
    • Difficulty: Medium
    • Time: 20
    • Tools needed: Account Center access, SSH
  • Applies to: DV 4.0
    • Difficulty: Medium
    • Time: 20
    • Tools needed: Account Center access, SSH enabled
  • Applies to: (ve)
    • Difficulty: Medium
    • Time: 20
    • Tools needed: Account Center access, SSH

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.

Requirements

To get started, please visit your Server Guide in the Account Center, and make sure you have the following information ready:

  • IP address for your server

    NOTE:

    If DNS is set up for a domain you are hosting, you may use the domain instead of the IP address.

  • Your SSH username and password

Set root password

You will need to set your root password in the Account Center the first time you connect to your server.

  1. Log into your Account Center.
  2. Click on your primary domain.
  3. Click on SSH Access.
  4. Click on the option to set your root password.
  5. Type your new password twice, then save your changes.

Instructions

Enable SSH access

For security reasons, your Grid comes with SSH access disabled by default. Here are instructions for enabling SSH access:

  1. Log into your Account Center and click on your primary domain.
  2. Click on Server Administrator.

    acGRIDmainmenu_serversettings_admin_pass_ssh

  3. Set the SSH option to Enabled and click Save.

    acGRIDmainmenu_serversettings_admin_ssh_enable

NOTE:

This option enables SSH for the Server Administrator user only. This is the only Grid SSH user with wide-reaching permissions.

Instructions

Enable or Disable SSH access

For security reasons, Premium WordPress comes with SSH access disabled by default. Here are instructions for enabling SSH access:

  1. Log into your Account Center and enter the Premium WordPress Control Panel.
  2. Click on Manage Site for the site you would like to enable access for.
  3. 16_managesite
  4. From the "My Site" menu, select Settings and navigate to SSH & SFTP on the right side.
  5. 16_mysite_settings
  6. You will see a checkbox next to "SSH Access" that you can use to toggle between Enabled and Disabled. The checkbox will show a check when SSH access is enabled. 16_pwp_ssh_01_png

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.

  1. Log into your Plesk Control Panel.
  2. Click the Website & Domains tab.

    cp_websites_domains_jpg

  3. Select Web Hosting Access.

    cp_wd_webhostingaccess_jpg

  4. Select /bin/bash for SSH access to server with FTP user's credentials.

    cp_ftp_ssh_jpg

  5. 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 00000 with your site number):

  • Server: s00000.gridserver.com
  • Username: example.com
  • Password: This is the same as your Server Administrator FTP password. Read this article if you need to reset this password.

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).

  1. Open your SSH client.
  2. To initiate a connection, type:
    ssh username@hostname 
    Replace "username" with the username and "hostname" with the hostname found in the SETTINGS section of your WordPress control panel under SSH & SFTP.
  3. Type:
    ssh example.com@s00000.gridserver.com
    
    OR
    ssh example.com@example.com
    
    

    NOTE:

    If you are trying to connect as a sub-FTP user on the Grid, you will want to use the following command context:

    ssh subftpuser%example.com@example.com
    
    

    In this case, the username is the full email address. But, you will need to replace the @ symbol in the email address with a % to make sure the command works.

      margin-bottom: 2em !important;" >="">Server: example.com
    • Username: subftpuser%example.com
    • Password: This is the same as your email password.
  4. 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 root@example.com
    
    OR (IP address version)
    ssh root@70.32.86.175
    
    OR (domain FTP user version)
    ssh domainuser@example.com
    
    
  5. Be sure to replace xxx.xxx.xxx.xxx with your server's IP address. Type:
    ssh root@xxx.xxx.xxx.xxx
    
  6. 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
    
    
  7. 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.
  8. You can also copy and paste, using Command+V to paste.
    
    Password:
    
    
  9. That's it, now you're connected to your Premium WordPress service via SSH.
  10. You are now logged into your Grid via SSH. You should see output like this:
    
    The programs included with the Debian GNU/Linux system are free software;
    the exact distribution terms for each program are described in the
    individual files in /usr/share/doc/*/copyright.
    
    Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
    permitted by applicable law.
    example.com@n11:~$
    
    

    You can begin typing commands at the prompt.

  11. 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.

  12. The output will look something like this:
    
    The programs included with the Debian GNU/Linux system are free software;
    the exact distribution terms for each program are described in the
    individual files in /usr/share/doc/*/copyright.
    
    Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
    permitted by applicable law.
    root@XX:~$
    
    

    You can begin typing commands at the prompt.

Resources

 

Continue