• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
NameHero Blog

NameHero Blog

Web Hosting Tips & Resources From NameHero

  • Hosting
    • Web Hosting
    • VPS Hosting
    • WordPress Hosting
    • WooCommerce Hosting
  • Reseller
  • Enterprise
  • Domains
  • Account
  • Blog Home
  • Categories

How To Connect To Your Web Hosting Account Using SSH And SFTP

Ryan Gray

Published on: May 16, 2018

Categories: Web Hosting 0

I keep seeing this issue come up inside the helpdesk (as well as on Stack Overflow), so I thought I’d save us all sometime by doing a guide on how to connect to your NameHero hosting account via SSH and SFTP.

First, it’s important to note that SSH/SFTP is disabled on all Web Hosting and Reseller Hosting accounts by default.

If you want access, you need to open a new support ticket to ask our team enable it for you. Please provide them with the cPanel username you wish to set it up on.

We do this for security, to validate you only have good intentions in mind.

Once it’s enabled by our support team, you can follow the guide to connect.

Generate Your Public Key

When connecting to SSH or SFTP at NameHero password authentication is disabled.

This means you must add your public SSH key inside of cPanel and authorize it to connect.

To get started, you first need to have a key generated on your computer.

To see if you already have an SSH key setup (on a Mac) go to Utilities -> Terminateand type:
cd ~/.ssh

And then:

ls -l

If you see a file called id_rsa.pub then you already have a key, you just need to copy it to your clipboard:

pbcopy < id_rsa.pub

If you don’t, you can easily generate one with the following command in your Mac terminal:

ssh-keygen -t rsa -C "[email protected]"

Using your email address allows you to easily be able to identify the SSH key.

If you’re using a Windows machine, you may find this easier using PuTTY to generate the key.

Add Your Public Key To cPanel

Once you have your public key on your clipboard, you need to go to cPanel -> SSH Access:

Then click on Manage SSH Keys:

You then want to Import Key:

You’ll notice they also have a section to Generate a New Key, but I personally rather generate those on my computer so it stores everything in the correct place (see above).

Next, you just need to paste your public key in the selected box:

Public SSH key

As long as you’re using a public key, you don’t have to worry about the other text fields.

I suppose you could put a name for the key if you plan on having multiple if it’s not already contained in your public key file.

Once your key has been imported, you then need to go back and authorize it by clicking on Manage:

On the next screen you’ll be able to Authorize it:

Congratulations!  At this point your public SSH key has been added to your cPanel account and you’re ready to connect via SSH or SFTP.

Connect To SSH

If you’re using a Windows machine, you may wish to use the PuTTY SSH client.

If you’re using a Mac (like me) I recommend using a new Terminal window which is found inside the Utilities folder:

To connect, you’ll need:

Server Hostname: node201.namehero.net (please note this depends on what server your account is on)

Port: 2200 (maybe different depending on your server, kindly ask support if 2200 doesn’t connect)

Username: Your cPanel username

You will not need your password.

To connect via the Mac terminal you would type something like this:

ssh -p 2200 [email protected]

Congratulations, you’re now ready to use SSH.

Now please note, if you don’t have experience with SSH, you probably shouldn’t be in here.  You can seriously mess up some stuff if you’re not careful!  So please keep this in mind!

Connect To SFTP

SFTP is a secure file transfer program that you can use in place of FTP to ensure the safest connection.

If you don’t have an FTP client, I recommend downloading Filezilla as it’s a good free one.

Once you have it downloaded, you’ll need to set it up to use your private key you setup in the first step.

To do this, open Filezilla and click on Filezilla -> Settings -> SFTP (using a Mac):

You can then click on the Add key file… button.

Then, hold down Shift+Command+G and type in ~/.ssh

You will then be inside the folder that contains your private key and you can click on it and click Open:

Congratulations, you’ve added your SSH key to Filezilla.

To setup an SFTP connect, open up your site manager and use the settings noted above (in SSH) to look something like this:

You’ll notice once you select Logon Type: Key file it will get rid of the password option and will use the SSH key.

You’ll also want to make sure your Host is the correct server name and the port is 2200 (or maybe different depending on your server. Kindly contact support if this doesn’t work).

That’s it!  You can now connect and begin using SFTP to upload/download your website files.

How To Setup SSH And SFTP At NameHero

I’ve filmed a video tutorial if you’d like to follow along these steps with me using my Mac:

Feel free to let me know if you have any questions or run into problems!

Ryan Gray
Ryan Gray

Ryan Gray is the founder and CEO of NameHero, one of the fastest growing independent web hosts in the United States. Ryan has been working online since 1998 and has over two-decades experience in Internet Entrepreneurship.

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

Follow & Subscribe

Exclusive promos, content and more!

Most Popular Posts

Speed up your site: solving the WordPress slowdown

NameHero’s Recommended WordPress Plugin and Theme Setup (2023)

How To Increase The InnoDB Buffer Pool Size

How To Fix A Stuck All-in-One WP Migration Import

How To Add A Subdomain In Cloudflare

Top Categories

  • WordPress
  • Website Performance
  • Web Hosting
  • Resellers
  • Website Development
  • Website Security
  • VPS Hosting
  • SEO Tips
  • Announcements
  • Domain Registration
NameHero

NameHero proudly provides web hosting to over 40,000 customers with 99.9% uptime to over 750,000 websites.

  • Master Card
  • Visa
  • American Express
  • Discover
  • Paypal
Products
  • Web Hosting
  • VPS Hosting
  • WordPress Hosting
  • WooCommerce Hosting
  • Reseller Hosting
  • Enterprise Hosting
  • Domains
Help & Support
  • NameHero Blog
  • Knowledgebase
  • Announcements
  • Affiliates
Company
  • About Us
  • Contact Sales
  • Reviews
  • Uptime
  • We're Hiring

Copyright © 2023 NameHero, LLC. All rights reserved.

  • Privacy Policy
  • Terms of Use
  • Acceptable Use Policy
  • Payment Policy
  • DMCA