The Secure SHell (SSH) command line is available through a Mac using the Terminal application. A private and public key pair is required before connecting to the server. These instructions are for use with a shared server. Learn more about SSH Hosting.
Generate Key for Shell Access
SSH access is allowed using a Public and private key. These keys are managed in the cPanel. Follow the steps below to generate a key.
- Login to the cPanel and then go to the SSH/Shell Access icon. Click on it to access the section where you can generate the private key.

- Click on the button labeled Manage SSH Keys.

- Click on the button labeled Generate a new key.

- Type in a password (do NOT use the password generator), then confirm it. Make sure to write down your password or save a copy in a secure location. Leave the key type at RSA and the key size at 2048. You can choose to make it 4096 if you wish.
- If you are creating a key for the first time, click on the Generate Key button.
- You should then see a confirmation that the key was generated. Click on the Go Back button to return to the Manage SSH Keys page.
- You should see the Public key and the Private key generated with the name “id_rsa”. Click on View/Download for the PRIVATE key. This is the key that you will need to load onto your Mac.
- Download the file to your Mac client. To simplify this tutorial, copy the file to your desktop.
- Check to see if the Public key has an authorization status of NOT AUTHORIZED. Newly generated keys are not initially authorized for use. Click on the Manage link. You will see a blue Authorize button. Click on this button to authorize the key. NOTE: If you don’t authorize this key, it doesn’t matter what you do on the Mac side; you won’t be able to log in.

The next part of the process requires that you log in to your Mac as an administrator. We will be using the default Terminal application to log in to SSH using the key that we generated above.
Use Apple Terminal Program to Connect to SSH
- Login to your Terminal program. If you don’t know how to do this, go to the magnifying glass on the Apple desktop. This is usually at the top right and is called Spotlight Search in the current Mac OS. Type in “terminal,” then hit enter. You should see Terminal appear as an application. Select it, and it will launch. Note that if you are not logged into your Mac as the administrator, you will not be able to make these changes.
- Go to your desktop where you copied the ID_RSA file. The terminal command is cd Desktop.
- Make sure that the ID_RSA file is already on your desktop. Then type the following into your terminal: cp -frp id_rsa ~/.sshThis will copy the key into the .ssh folder.
- Next, make sure that the file permissions are correct on your file with the command chmod 600 ~/.ssh/id_rsa
- When this is complete, you can use the SSH command to log in to the server. The cPanel user name and the server name will need to be used. The command will look like this: ssh -p 2222 [email protected]’s an example: ssh -p 2222 [email protected])
- If this is the first time you have connected the server, you may see a message stating that it can’t identify the server. Just click on “YES” to proceed (make you’re connecting to the right server). The password should automatically work, and you should see the terminal connect.
This completes the tutorial for creating a new SSH key to connect your Mac terminal program to the InMotion Hosting shared server SSH. For best security practices, keep your key private and don’t share the password unless necessary.
Toggle panel: Easy SEO