Connecting To Cloud with SSH Key
Unlike Bluehost's Shared, VPS, or Dedicated servers, the Cloud service do not include cPanel or File Manager to access website files. To manage files, including uploading or downloading, you will need to use either SSH or SFTP, depending on your needs. For simple file management, users should use SFTP. Only those who need to control Bash or WP CLI using SSH will need SSH, as this article explains how to connect to sites at Bluehost Cloud sites through SSH using an SSH Key for easy access to websites.
Getting Started
To open an SSH connection to the server using an SSH key, you will need to produce both a public and a private key first and upload the private key to the Bluehost Cloud website or those websites that will be making use of the key. In your Cloud server, you can create a separate user for every website with unique keys or a Global SSH user that uses the same SSH key for all websites. Regardless of whether you are connecting with a global user or individual user, the key can either be generated on a local computer and uploaded to the cloud or generated on the cloud side.
Generating SSH Keys
Using Cloud To Generate SSH Keys
The steps for creating SSH keys follow the same basic steps as when creating a new SSH/SFTP user, but with a few slight variations.
- Open the Bluehost Account Manager.
- Open the Hosting tab and click MANAGE to open the website overview page specific to the Cloud hosting account.
- Click MANAGE on the website where the SSH account is being created.
- Click the SSH/SFTP tab, then ADD SSH USER to open a new page.
- On the new tab, you can either leave Global SSH User off to create an individual SSH User for this specific site or enable Global SSH User, which will auto-create an SSH user for every WordPress site on the Cloud account. Please note that the username will be different for each site when using the Global User Option. The site ID will be included after the specified username (for instance, [email protected] in the example below).
- Make sure Enable SSH Key is enabled and choose Generate a new Public Key and Private Key.
- A new screen will display the generated Public Key and Private Key.
- Make sure to click the copy icon to save the Private Key.
- Open a text editor on your local computer to paste the Private Key and save it as id_rsa.
- The password used when connecting will be your hosting account password.
- Click Add User after uploading the Public Key using either option above.
Generating and Uploading an SSH Public Key
- In the terminal of your choice (for Windows users, we recommend using PowerShell), run the command: ssh-keygen -b 2048 -t rsa to generate a 2048-bit key or ssh-keygen -b 4096 -t rsa to generate a 4096-bit key and hit enter. Make a note of the file name and location for future reference.
- Enter a password for the Private Key twice, which will be used to connect to the server for any SSH connection using this key configuration. You can leave this blank and hit enter if you don't wish to use a password; however, using a password is highly recommended.
- You will now see an output listing the file name for both the Private Key and Public Key, as well as the fingerprint for the key. Please note that the Public Key should end in .pub
- You can now either open the file created with a text editor (ex: notepad) or run the command: cat <path to the file/filename.pub> and copy the contents of the file.
- Paste the content of the .pub file into the section shown below, and then click Add User.
- In the terminal of your choice, run the command: ssh <user>@ssh.atomicsites.net -p 22 and enter the password to your SSH key.
Summary
SSH or SFTP is used to manage files on Bluehost Cloud since it does not support cPanel or File Manager. For basic file management, SFTP is recommended, while SSH is for advanced users. This tutorial will explain how to connect to Bluehost Cloud sites via SSH using SSH keys. It explains how to generate SSH keys, create SSH users, and upload public keys to establish secure connections. The following are the steps that would allow users to manage website files efficiently on Bluehost Cloud.
ContactSupportSnippet