How Can We Help?
How to access your account using SSH keys
This article describes how to create and deploy SSH keys. With SSH keys, you can automate logins to your XauZit Cloud account, or use two-factor authentication for increased security.
Using SSH keys
When you log in to your account interactively using an SSH client as described in this article, you must enter a password every time. But what if you want to run an automated process? Perhaps you want to automatically download a database backup at certain times to your local computer. In this scenario, you don’t want to have to manually type your SSH password every time the backup process runs.
Or what if you want to allow multiple users to transfer files securely using SFTP, as described in this article? You would need to give them your cPanel password, which would give them complete access to your account.
You can solve these problems by using SSH keys to connect to your account. SSH keys enable your computer to log in to your XauZit Cloud account automatically without you typing a password. To use SSH keys, you must first create a public key and private key (also known as a key pair). The client’s private key stays on your local computer, while the public key resides on the XauZit Cloud server.
Alternatively, you can also create SSH keys and protect them with a passphrase for two-factor authentication. Although this configuration does not enable automatic logins, it does provide an extra layer of security, because you must have the correct key file and know the correct passphrase to access the account.
To set up SSH keys, follow the appropriate procedure below for your computer’s operating system.
Windows operating systems
Older Windows versions
Older versions of Microsoft Windows do not include the SSH suite of programs, so you must download an SSH key generator program first. XauZit Cloud recommends PuTTYgen, a free program that you can download here. After you have downloaded the PuTTYgen executable to your local computer, you can use it to generate a key pair.
To generate and configure a key pair, follow these steps:
- Start PuTTYgen.
- Under Parameters, click the SSH-2 RSA radio button.
- Confirm that the Number of bits in a generated key value is set to 2048.
- Click Generate.
- Move the mouse around to generate random data. After a few seconds, PuTTYgen creates the key.
- You can optionally add a passphrase to the key. If you are generating keys to use for automated processes, you should skip this step. However, if you want to set up two-factor authentication by using key files and a passphrase, then type a password for the key in the Key Passphrase and Confirm Passphrase text boxes.
- Click Save public key, choose the folder, type id_rsa.pub in the File name text box, and then click Save.
- Click Save private key, choose the folder, type id_rsa.ppk in the File name text box, and then click Save.
- Select all of the text in the Public key for pasting into OpenSSH authorized_keys file text box, right-click on the text, and then click Copy.
- Log in to your XauZit Cloud SSH account using PuTTY.
- At the command line on the server, type the following commands:
mkdir ~/.ssh nano ~/.ssh/authorized_keys
- In the nano text editor, paste the public key text that you copied in step 9.
- Press Ctrl+x, type y to save the file, and then press Enter. nano saves the file and exits.
- At the command line on the server, type the following commands to set the correct file permissions:
chmod 600 ~/.ssh/authorized_keys chmod 700 ~/.ssh
- To close the connection, type exit and then press Enter.
At this point, you have created the SSH key pair and deployed the client’s public key to the XauZit Cloud server. You are now ready to configure the PuTTY client to connect to your SSH account using the private key.
To configure PuTTY to use your private key, follow these steps:
- Start PuTTY.
- In the Category pane, expand SSH, and then click Auth.
- Under Authentication Parameters, click Browse.
- Locate the id_rsa.ppk file that you created in the previous procedure.
- In the Category pane, click Session.
- In the Host Name (or IP address) text box, type username@example.com. Replace username with your XauZit Cloud username, and replace example.com with your site’s domain name.
- In the Port text box, type 7822.
- Confirm that the Connection type radio button is set to SSH.
- In the Saved Sessions text box, type a name for the connection. For example, type XauZit Cloud account.
- Click Save.
- To connect to your SSH account, double-click the connection name in the list. PuTTY should connect without asking you to type your account password. If you set a passphrase for the key, however, you must type the key passphrase.
Windows 10
As of April 2018, Windows 10 includes native SSH programs. To generate and configure a key pair, follow these steps:
- To open the Run dialog box, press Windows key+r.
- In the Run dialog box, type cmd and then click OK to open a command prompt window.
- At the command prompt, type the following command:
ssh-keygen
- Press Enter when you are asked where to save the key.
- You can optionally add a passphrase to the key. If you are generating keys to use in automated processes, you should just press Enter. However, if you want to set up two-factor authentication by using key files and a password, then type a password for the key and then press Enter.
- At the command line, type the following command:
more .ssh/id_rsa.pub
- Select the text listed in the file and copy it.
- Log in to your XauZit Cloud account using SSH. At the command line, type the following command, replacing username wih your XauZit Cloud username, and example.com with your site’s domain name:
Copyssh -p 7822 username@example.com
- At the command line on the server, type the following commands:
mkdir ~/.ssh nano ~/.ssh/authorized_keys
- In the nano text editor, paste the public key text that you copied in step 7.
- Press Ctrl+x, type y to save the file, and then press Enter. nano saves the file and exits.
- At the command line on the server, type the following commands to set the correct file permissions:
chmod 600 ~/.ssh/authorized_keys chmod 700 ~/.ssh
- To close the connection, type exit and then press Enter.
At this point, you have created the SSH key pair and deployed the client’s public key to the XauZit Cloud server. You are now ready to connect to your SSH account using the private key. To do this, follow these steps:
-
- At the command prompt, type the following command. Replace username with your XauZit Cloud username, and replace example.com with your site’s domain name:
ssh -p 7822 [email protected]
- The SSH client should connect without asking you to type your account password. If you set a passphrase for the key, however, you must type the key passphrase. When you are connected, the remote server’s command line prompt appears:
username@hostname [~]#
- You can now run commands on the remote server. For example, to see a listing of the current directory, type ls and then press Enter.
- To close the SSH connection when you are done, type exit and then press Enter.
- To close the command prompt window, type exit and then press Enter.
Mac OS X and Linux operating systems
Both Mac OS X and Linux include SSH support, so you do not have to download any special programs to generate SSH keys.
To create and configure SSH keys, follow these steps:
- Open a terminal window. The procedure to do this depends on the operating system and desktop environment.
- On Mac OS X, click Applications, click Utilities, and then click Terminal.
- At the command prompt, type the following command:
ssh-keygen -t rsa
- Press Enter when you are asked where to save the key.
- You can optionally add a passphrase to the key. If you are generating keys to use in automated processes, you should just press Enter. However, if you want to set up two-factor authentication by using key files and a password, then type a password for the key and then press Enter.
- At the command line, type the following command:
cat ~/.ssh/id_rsa.pub
- Select the text in the file and copy it.
- Log in to your XauZit Cloud account using SSH. At the command line, type the following command, replacing username wih your XauZit Cloud username, and example.com with your site’s domain name:
ssh -p 7822 username@example.com
- At the command line, type the following commands:
mkdir ~/.ssh nano ~/.ssh/authorized_keys
- In the nano text editor, paste the public key text that you copied in step 6.
- Press Ctrl+x, type y to save the file, and then press Enter. nano saves the file and exits.
- At the command line, type the following commands to set the correct file permissions:
chmod 600 ~/.ssh/authorized_keys chmod 700 ~/.ssh
- To close the connection, type exit and then press Enter.
At this point, you have created the SSH key pair and deployed the client’s public key to the XauZit Cloud server. You are now ready to connect to your SSH account using the keys.
To connect to your SSH account using the keys, follow these steps:
- Open a terminal window. The procedure to do this depends on the operating system and desktop environment.
- On Mac OS X, click Applications, click Utilities, and then click Terminal.
- At the command prompt, type the following command. Replace username with your XauZit Cloud username, and replace example.com with your site’s domain name:
ssh -p 7822 username@example.com
- The SSH client should connect without asking you to type your account password. If you set a passphrase for the key, however, you must type the key passphrase.

