How to Connect to SSH at Kinsta

Updated on October 07, 2018
225
Shares

SSH is a protocol for secure remote login and other secure network services over an insecure network. Kinsta provides SSH access to your sites on Business 1 and higher plans. SSH access allows you to log into a command prompt, perform common sysadmin tasks, and execute commands just as if you were sitting at the server itself. You also have the ability to run additional tools such as Git, Composer, npm, WP-CLI, etc.

Follow the directions below on how to connect to SSH on your WordPress site.

SSH should be used by advanced users only. Running improper commands via SSH could easily break your site. If you are not comfortable doing this, please check with a developer or our support first.

SSH Access Login Info

To connect to SSH you’ll need the following pieces of information:

  • server address (IP address)
  • username
  • password
  • port (we take security seriously here at Kinsta, each site uses a different port)

Kinsta customers can find this information under the site’s Info tab within your MyKinsta dashboard (as seen below).

Connect to SSH – MyKinsta login information

Connect to SSH – MyKinsta login information

How to Connect to SSH on Windows

For those of you running Windows, you will need a terminal client to connect to SSH.

Step 1

We recommend downloading the free PuTTY client. Grab the .msi installer as this also includes PuTTYgen. If you want to use SSH keys later down the road, you will need this.

Step 2

Launch PuTTY and input your host name (Kinsta IP Address) and the unique port number. Then click “Open.”

ssh putty client

Putty Client

Step 3

If this is your first time connecting you will most likely see a rsa2 key prompt. Go ahead and click “Yes” which will trust the host in the future.

putty security alert rsa2 key

Putty Security Alert

Step 4

You will need to input your Kinsta username and press Enter.

login putty username

Putty Login

Step 5

You will then be prompted to enter your password. Then press Enter.

ssh password login

Putty Password

You are now connected via SSH to your WordPress site.

login successful ssh

Putty Successful Login

You can then run commands such as “ls” or “cd” to list items and navigate throughout your site’s directory. WP-CLI is also installed by default on all sites.

run ssh commands

Navigating Putty

How to Connect to SSH on Mac/Linux

On Mac or Linux it is actually a lot easier to connect to SSH because the OS already has a terminal built into it.

Step 1

All you need to do is open the terminal. Navigate to Applications > Utilities and double-click on Terminal.

Step 2

Then enter the command in the following form (You can copy/paste this directly from your MyKinsta dashboard):

ssh username@hostname -p portnumber

How to Generate SSH Key Pair on Windows

You can connect to SSH with your username and password, or you can generate an SSH key pair. SSH keys provide a more secure way of logging into a server and eliminate the need for a password. Although you can further protect your login by adding a passphrase.

Step 1

Launch PuTTYgen. If you haven’t download it yet you can grab it here.

Step 2

The default parameters should be fine in most configurations. Click on “Generate.”

PuTTY Key Generator

PuTTY Key Generator

Step 3

You will need to move your mouse around to generate some randomness.

PuTTYgen move mouse around

PuTTYgen move mouse around

Step 4

Save both your public (.txt) and private key (.ppk). Important: Keep your private key safe and don’t share it with anyone.

Save public and private keys

Save public and private keys

Step 5

Leave the PuTTY window open and skip down to where you add your public key to MyKinsta.

How to Generate SSH Key Pair on MAC/Linux

Step 1

Launch the Terminal from “Applications → Utilities → Terminal.”

Step 2

Use the following command to start the key generation.

ssh-keygen -t rsa

Step 3

You will be prompted to choose a location to save your private key. If you simply leave it blank it will save it here:

/home/youruser/.ssh/id_rsa

The public key (.PUB) will get created in the same location.

/home/youruser/.ssh/id_rsa.pub

Step 4

You will then be prompted to choose a passphrase. You can leave it empty if you don’t want to use a passphrase.

How to Add SSH Keys in MyKinsta

Now that you have your SSH keys, you can upload your public key in the MyKinsta dashboard.

Step 1

Click into your user profile on the bottom left-hand side, and click on “User Settings.”

MyKinsta user settings

MyKinsta user settings

Step 2

Click on “Add SSH key.”

Add SSH key

Add SSH key

Step 3

Choose a label and paste your public key.

  • If you’re running on Windows copy and paste the public key directly from PuTTYgen.
  • If you’re running on Mac/Linux you can copy your public key to your clipboard first by using the following command: pbcopy < ~/.ssh/id_rsa.pub

After you paste your public key you should see a green confirmation that says “valid RSA key.” Then click “OK.”

Valid rsa key

Valid RSA key

How to Connect to SSH on Windows With SSH Keys

Step 1

Launch PuTTY and input your host name (Kinsta IP Address) and the unique port number.

ssh putty client

Putty Client

Step 2

Under “Connection → Data” enter your Kinsta username in the “Auto-login username” field.

SSH auto-login username

SSH auto-login username

Step 3

Under “Connection → SSH →  Auth” select your private key file for authentication.

SSH private key

SSH private key

Step 4

Under “Session” choose a new “Saved Session” name and click on “Save.” Then click “Open.”

SSH save session

SSH save session

You will most likely see a security alert about a change in keys. Click on “Yes.”

PuTTY security alert

PuTTY security alert

If you set up a passphrase you will need to enter that.

SSH passphrase

SSH passphrase

Otherwise, it will log you right in.

Kinsta SSH

Kinsta SSH

How to Connect to SSH on MAC/Linux With SSH Keys

Step 1

Launch the Terminal from “Applications → Utilities → Terminal.”

Step 2

You now need to load your saved private key from earlier into your SSH-agent. Use the following command:

ssh-add /youruser/.ssh/id_rsa

Step 3

You will then be prompted to enter in the passphrase if you have one.

Step 4

Then enter the command in the following form (You can copy/paste this directly from your MyKinsta dashboard):

ssh username@hostname -p portnumber

Additional Notes

If you have trouble connecting, you might need to reset your SSH password or delete entries from your known_hosts file.

Was this article helpful?
No, or there was something off

Hand-picked related articles

Use WordPress?

Use WordPress?

Join 20,000+ others who get our FREE weekly newsletter with WordPress tips on how to drive more traffic and revenue to your business!

Consent

You have Successfully Subscribed!

Send this to a friend