How to Connect to your Server with SSH

In this tutorial, we’re going to be using PuTTY to connect to your managed VPS, Cloud or dedicated server via SSH. For Windows users without an SSH client, we recommend you download PuTTY or enable OpenSSH.

Shared server users, please see SSH access for Resellers and Shared Servers.

Requirements for using SSH to login to your VPS or Dedicated Server

There are a few requirements for using SSH with your VPS or Dedicated Server. These include making sure that your account has been granted SSH access and that your IP address has been added to the firewall. Both of these requirements can be fulfilled through the WHM interface. The following articles will help you meet these prerequisites:

  1. Configure SSH access
  2. Whitelist your IP address in your server firewall
  3. Windows users, install an SSH Client or OpenSSH

Terminal on Linux/macOS/BSD

This applies to Windows users with OpenSSH: Open the Start menu,select Powershell, and then Run as Administrator.

If you are trying to directly connect from a Linux or Mac terminal via SSH, please note the format of the command would need to be in this format:18If you are trying to directly connect from a Linux or Mac terminal via SSH, please note the format of the command would need to be in this format:

[Bob ~]$ ssh [email protected] -p 22

If you do not specify the full username such as username@example, the server would instead try to login as your local user, in this case [email protected], and because that user doesn’t exist on the server you’d get a login error.

Settings for using PuTTY

PuTTY is a free, open-source terminal emulator written by Simon Tatham that gives you access to SSH. It supports several different network protocols. Before we open PuTTY, you’ll need the following settings:

Your hostname and username can be found in the Technical Details of your AMP home page.

Host Name:As your hostname, you can use either your server’s ip address, your domain, or your server name (as in vps####.inmotionhosting.com or biz152.inmotionhosting.com)
Username:Use your cPanel username.
Password:Use your cPanel password.

How to connect using PuTTY

In this tutorial, I am using vps801.inmotionhosting.com as the host name, “brad” as the cPanel username, and the ******** as the password.

  1. Open Putty.
  2. Enter your hostname.

    open-putty-and-enter-your-hostname-then-click-open

  3. Click “Open“.

    Can’t connect? Getting an error message Network Error: Connection timed out? Be sure to add your ip address to the firewall.


  4. If you get a “PuTTY Security Alert“, click yes to continue (If you read the message, this is your server so you should trust it).

    click-yes-to-the-putty-security-alert

  5. You will see “Login As“. Please enter your username and then hit Enter.

    putty-login-as-prompt-is-asking-for-your-username

  6. You will then see username@vps####.inmotionhosting.com's password:. Enter your password and hit enter. For security reasons, PuTTY will not show anything when you type your password, this is normal.

    enter-your-password-into-putty

  7. When you have successfully logged in, you’ll see username@vps####.inmotionhosting.com [~]#.

    Note! If you get an error stating Shell Access is Not Enabled on your server, you will need to contact tech support to have our higher level of support enable the shell access. If you can access your WHM, you can enable SSH through your WHM.

Congratulations, you have now successfully logged into your server via SSH!

Are you trying to get started with Ansible? Make sure you generate an SSH key before getting started with your Ansible Management Container.

Learn more from our Managed VPS Hosting Product Guide.

Upgrade to VPS Hosting for Peak Performance

Upgrade to InMotion VPS Hosting today for top-notch performance, security, and flexibility, and save up to $2,412 – a faster, stronger hosting solution is just a click away!

check markSSD Storage check markHigh-Availability check markIronclad Security check markPremium Support

VPS Hosting

29 thoughts on “How to Connect to your Server with SSH

  1. I was finally able to SSH Access through PuTTY with the instructions left in this article but I don’t have root access in my session. Is there something that I missed?

    1. Hi, Ray! There are a few extra steps to getting root access, but if you’ve already been able to connect to the server you won’t have much more to do. Please refer to our guide on Root Access for details on how to get the root access password, and remember to SSH in as ‘root’ with it. Hope that helps!

    1. Hi Alex,

      The hostname will be the IP address of the server you are trying to connect to via PuTTY. This information can be obtained from your cPanel:

      https://www.inmotionhosting.com/support/edu/cpanel/how-to-find-your-shared-ip-address-of-your-server-in-cpanel/

      If you are already connected to the server in a terminal, you can use the command hostname -i to get your server IP.

      Best Regards,
      Alyssa K.

      Best Regards,
      Alyssa K.

  2. In my ssh window (OSx terminal), I am being asked for a password. NONE that I have entered have worked. So maybe there is a step missing in your explanation because I am clearly NOT logged in and clearly frustrated.

    1. Sorry for the frustration with getting logged into SSH. We need you to provide the steps you’re taking in order to determine why you can’t log in. Can you list the exact steps you’re taking, please? If you want immediate assistance, then please contact our live technical support team (the contact information is at the bottom of this page).

    1. Thanks for your comment. It is not our intention to ignore Mac OS users. For Mac, the terminal is built-in, so there is no need to use PuTTY. However, our guide does include the SSH command that you would simply enter into the Terminal application included in the Mac OS, to initiate an SSH connection. Here’s the excerpt:

      If you are trying to directly connect from a Linux or Mac terminal via SSH, please note the format of the command would need to be in this format:

      [Bob ~]$ ssh [email protected] -p 22

      If you do not specify the full username such as username@example, the server would instead try to login as your local user, in this case [email protected], and because that user doesn’t exist on the server you’d get a login error.

      We also have a separate guide centered around connecting to SSH via Mac OS’s Terminal.

      If you need any further assistance, we are always happy to help. Your feedback is very important to us as well! We are always looking for subjects and content that we can create to assist everyone in the community!

      Sincerely,
      Carlos E
      #applefanboy

  3. I was finally able to access because a step was missing (regarding activating the public key).

    However, I was looking to install Node.js, but that ability is blocked for shared server subscriptions?

  4. I’m on a shared service. When trying to connect, I get the error “Server refused our key” after typing in my username.

    I followed all of the directions pertaining to putty and key creation.

  5. hi, i have a “web hosting – power plan”, to be able to connect via ssh and install node.js i necessary need a vps plan?

    thanks!

  6. Hello,

    I have the “Power Plan” for web hosting, and in the APM I do not have an option for the WHM menu anywhere. Am I missing something here?

    1. Power plans are shared hosting. You do not have access to WHM. This article is for VPS and dedicated customers. Here’s the article for shared customers https://www.inmotionhosting.com/support/website/ssh/shared-reseller-ssh

  7. Hi 

    I have problem when I try access to my ssh from terminal “MacOS”

    the message is “Operation timed out” 

    What should I do ? 

     

    Best Regards,

     

  8. Hi all,

    I’ve a Web Hosting with the Domain. I am using a Video Sharing Site that I installed on my Domain via Web Hosting CPanel. But the Video Sharing Site required the ffmpeg module. I’ve tried so many time to install this module using Perl Mdule in the CPanel. But it could not be installed and give an error.

    So anyone here to help me out. Ho can I install ffmpeg module for my Website.

    Thanks in Advance

     

    1. Hello Muhammad,

      Are you on a shared server? Please keep in mind that ffmpeg can only installed on a VPS or higher package.

      Best Regards,
      TJ Edens

  9. I am a little fuzzy on your reference to connecting using terminal on a MAC. As PuTTY is not a MAC option.

    You have a short info explanation in the blue box:

    [Bob ~]$ ssh [email protected] -p 22

    If I understand this then I would enter ssh myusername@vps(mynumber).inmotionhosting.com -p 22

    Not sure about the “-p22”

    Tried to find an Inmotion video regarding connecting to SSH using terminal. Haven’t found yet. Is there one?

    thanks.

    1. Hello Ernest,

      Yes, you should be able to use that command via Terminal on the Mac. The -p 22 indicates that it should connect using port 22.

      Kindest Regards,
      Scott M

Was this article helpful? Join the conversation!

Questions about our MailChannels Deployment? We have answers and are here to help!Learn More
+