SSH

From Hostek.com Wiki
Revision as of 03:19, 26 July 2012 by Alex.long (Talk | contribs) (SSH)

Jump to: navigation, search

SSH

The dedicated IP and port for SSH access on Linux VPS servers will be included in the email with server details. Alternatively we have an alternate port which can be used for SSH however this will need to be configured. Please email support for the alternate port number and follow the steps below.


For an SSH client to use on Windows workstations, we recommend using Putty: http://www.securitytools.net/mirrors/putty/

Configuring alternate SSH port for your VPS

  • NOTE You must be familiar with editing Linux text files from a command prompt to proceed.


  1. Contact support for the alternate SSH port to use.
    If you have requested your VPS to not be behind our perimiter firewall and you are 100% managing your own firewall, then you can use any TCP port that you wish
  2. Add the alternate TCP port to the cPanel firewall:
    1. Log into WHM of your server
    2. Scroll down and select ConfigServer Security&Firewall
    3. Click Firewall Configuration
    4. Edit the TCP_IN line, adding the alternate SSH port, being careful to have comma before and after the number
      • Pay close attention to the formatting of the current entries in this line. Syntax errors will result in your VPS firewall failing to restart
    5. Click Change button at the bottom
  3. Configure SSH to use the new port:
    1. SSH into your VPS on the default port 22
    2. Edit the /etc/ssh/sshd_config file
    3. Change the line "Port 22" to "Port ####" (without quotes) where #### is the alternate port
    4. Save your changes
    5. Run the following command to restart the ssh service:
      service sshd restart
      • NOTE Do not disconnect your ssh session after restarting the service until you verify with a new session that your changes are successful. Otherwise you will not be able to correct any syntax errors in the sshd_config file
    6. While your SSH session is still open, launch a new ssh session to your server, connecting on the new port 4805
      • If you get a connection failed, check the /etc/ssh/sshd_config file for syntax errors and correct. Run the command "service sshd restart" (without quotes) after making any changes to the sshd_config file.