Setting Up SSH On Bluehost Shared Hosting With Your Mac

In this quick tutorial I’ll show you how to create new public and private keys within Bluehost, activating SSH access, and installing the public key in your Mac.

We will first want to login into your Bluehost c-Panel and look for SSH/Shell Access under the Security section.

From here, we’ll be able to create and manage our SSH keys.  Right now, we’ll click on generate a new key.  We’ll be creating new public and private keys called id_rsa_bluehost2, put in the password, and leave everything else as-is and press submit.

Now that the keys are created, you should be back to the main page that allows you to create and manage your SSH key, but this time we’ll click on view and download so that we can copy to the clipboard the public key to store on our machine which we will do shortly.

Next step before we do something with that public key is to click on the manage authorization so that we can activate the keys.

Before we leave Bluehost, the last thing we’ll want to take note is at the bottom of the main page are the credentials we’ll be using to SSHing in the terminal.  Hostname will typically be yourwebsitedomain.com and the username will whatever username you were using to login into c-panel.

 

That’s all we need to do in Bluehost.  Now we’ll go to the desktop and fire up the terminal.  You’ll want to navigate to the SSH folder.

>> cd ~/.ssh

And then view the directory.  You’re looking for a known_host file.  If you don’t have one then type

touch known_host

That will create a blank known_host file then you can open up known_host  with

vim known_host

This will open up the file.  Now lets paste the public key you copied earlier in your clip board into this file.  You’ll want to follow something like: [yourwebsitedomain.com]:22 and then paste your public key.

Exit vim and now everything is setup.  You should now be able to SSH into your Bluehost account with

>> ssh [email protected]

Enter your password and you’re in!