Creating SSH Keys


Maxihost provides users with the ability to deploy servers using their SSH keys.

SSH is extremely easy to get started and provides a secure way of logging into your servers. Here you can learn what SSH is, how it works, and how to create SSH keys both on Windows, Linux, and macOS.

If you're already comfortable with how SSH works, head to SSH Key Access.

What is SSH

SSH is a remote administration protocol that allows users to control and modify their servers remotely. SSH uses cryptographic techniques to ensure that all communication to and from the remote server happens in an encrypted manner.

It provides a mechanism for authenticating a user, transferring inputs from the client to the host, and relaying the output back to the client.

Any Linux or macOS user can SSH into their remote server directly from the terminal window. Windows users can take advantage of SSH clients like Putty.

How does SSH works

Linux or Mac enables you to use SSH clients straight from the terminal window. If you use Windows, you will need to download an SSH client to open SSH connections. The most popular SSH client is PuTTY.

The SSH command consists of three distinct parts:

ssh {user}@{host}

The SSH key command instructs your system that you want to open an encrypted Secure Shell Connection. {user} represents the account you want to access.

For example, you may want to access the root user, which is basically synonymous for system administrator with complete rights to modify anything on the system. {host} refers to the computer you want to access. This can be an IP Address or a domain name (e.g. www.xyzdomain.com).

When you hit enter, you will be prompted to enter the password for the requested account. When you type it in, nothing will appear on the screen, but your password is, in fact being transmitted. Once you’re done typing, hit enter once again. If your password is correct, you will be greeted with a remote terminal window.

You can read more about SSH commands here.

Creating SSH Keys

On Windows

You can create SSH keys in many ways. Windows requires an SSH client but doesn’t have a default SSH client on their operating system.

The easiest way we think is to generate SSH Keys using PuttY.

  1. Download PuttY. The two binaries you will need are:
    - PuTTY (the SSH and Telnet client itself) 
    - PuTTYgen (an RSA and DSA key generation utility)
  2. Open the PuTTYgen program.
  3. For Type of key to generate, select SSH-2 RSA.
  4. Click the Generate button.
  5. Type a passphrase in the Key passphrase field. Type the same passphrase in the Confirm passphrase field. You can use a key without a passphrase, but this is not recommended.
  6. Click the Save private key button to save the private key. Important: Never share your private key with anyone.
  7. Copy the contents under Public key for pasting into OpenSSH authorized_keys file.
  8. Save the contents you just copied somewhere. This is the public key you're going to use with Maxihost and any other services you'd like to connect with SSH. You can save it as a .txt file in order to be able to open it with a text file later.

On Linux & macOS

When you generate the keys, you will use ssh-keygen to store the keys in a safe location so you can bypass the login prompt when connecting to your instances.

  1. Open a Terminal window.
  2. Enter the following command: ssh-keygen -t rsa  This starts the key generation process. When you execute this command, the ssh-keygen utility prompts you to indicate where to store the key.
  3. Press the ENTER key to accept the default location. The ssh-keygen utility prompts you for a passphrase.

  4. Type in a passphrase. You can also hit the ENTER key to accept the default (no passphrase). However, this is not recommended. You will need to enter the passphrase a second time to continue.
  5. After you confirm the passphrase, the system generates the key pair

    Your identification has been saved in /Users/myname/.ssh/id_rsa.
    Your public key has been saved in /Users/myname/.ssh/id_rsa.pub.
    The key fingerprint is:
    ae:89:72:0b:85:da:5a:f4:7c:1f:c2:43:fd:c6:44:38 user@my-name.local
    The key's randomart image is:
    +--[ RSA 2048]----+
    |                 |
    |         .       |
    |        E .      |
    |   .   . o       |
    |  o . . S .      |
    | + + o . +       |
    |. + o = o +      |
    | o...o * o       |
    |.  oo.o .        |
    +-----------------+

Your private key is saved to the id_rsa file in the .ssh directory. Never share your private key with anyone.

Your public key is saved to the id_rsa.pub file and is the key you upload to your Maxihost account. You can save this key to the clipboard by running this:

pbcopy < ~/.ssh/id_rsa.pub

Now head over to SSH Key Access to learn how to import your recently generated SSH key to Maxihost.


Was this article helpful?
0 out of 0 found this helpful

Have more questions? Submit a request