ViniHost Logo

How to Access Your Account Using SSH Keys

Overview

This article describes how to create and deploy SSH keys. With SSH keys, you can automate logins to your ViniHost Hosting account or use two-factor authentication for increased security.

This article describes how to configure SSH keys using the command line. Alternatively, if your hosting account includes cPanel, you can use its graphical user interface to configure SSH keys.

Table of Contents

Using SSH Keys

When you log in to your account interactively using an SSH client, you must enter a password every time. However, if you want to run an automated process, you can use SSH keys to connect to your account without typing a password.

SSH keys enable your computer to log in to your ViniHost Hosting account automatically. To use SSH keys, you must first create a public key and private key (key pair). The private key stays on your local computer, while the public key resides on the ViniHost Hosting server.

You can also create SSH keys with a passphrase for two-factor authentication, adding an extra layer of security.

Windows Operating Systems

Older Windows Versions

Older versions of Microsoft Windows do not include the SSH suite of programs. You need to download an SSH key generator program like PuTTYgen.

  1. Start PuTTYgen.
  2. Click the SSH-2 RSA radio button.
  3. Set the Number of bits in a generated key to 2048.
  4. Click Generate and move the mouse around to generate random data.
  5. Optionally add a passphrase, then click Save public key and Save private key.
  6. Copy the public key text and log in to your ViniHost Hosting SSH account using PuTTY.
  7. Use the command mkdir ~/.ssh and nano ~/.ssh/authorized_keys to paste the public key.
  8. Set file permissions with chmod 600 ~/.ssh/authorized_keys and chmod 700 ~/.ssh.

Windows 10

Windows 10 includes native SSH programs. To generate and configure a key pair:

  1. Open the Run dialog (Windows key + R), type cmd, and press Enter.
  2. Type ssh-keygen and follow the prompts.
  3. Copy the public key and log in to your ViniHost Hosting account using SSH.
  4. Create the .ssh directory and authorized_keys file as described above.

Mac OS X and Linux Operating Systems

Both Mac OS X and Linux include SSH support. To create and configure SSH keys:

  1. Open a terminal window.
  2. Type ssh-keygen -t rsa and follow the prompts.
  3. Copy the public key and log in to your ViniHost Hosting account using SSH.
  4. Create the .ssh directory and authorized_keys file as described above.

You can also configure your SSH client settings in the ~/.ssh/config file for easier access.

Get SSH Hosting

Experience the ViniHost Hosting difference today and get a pre-secured, pre-optimized website. Check out our web hosting plans today.