How to connect to your server via ssh

How to connect to your server via SSH

SSH is one of the best tools in a developer’s tool belt. It can be used to set up advanced environments, manipulate websites, use great tools like WP-CLI to automate common WordPress tasks, or access a website when all else fails. In this article I will look at what SSH is and how you can connect to your server via SSH.

Getting started with SSH

According to the specifications, SSH is "a protocol for secure remote login and other secure network services over an insecure network". In other words, it is nothing more than a way to log in to a computer and access the services it provides.

To log into your site’s container, you need two things: an SSH client and credentials. If you have problems with the connection, you will learn how to fix the SSH "Connection Refused" error.

SSH clients

On OSX and Linux you have everything you need to get started, you can use SSH from the terminal without any special software. On Windows you need an SSH client, the most popular is Putty. I give Windows users a short Putty tutorial below.

Login details

To log in via SSH, you’ll need at least four pieces of information:

  • Server Address
  • Username
  • Password
  • port

The server address is usually your domain name or and IP address. At Kinsta we use the IP address of your website.

In some cases, if the default port is required, you may not need to specify it. At Kinsta we take security seriously, so we use different ports for different sites.

If you are a Kinsta client, you will find the details of your server in your MyKinsta administrator. All of our plans include SSH access. Choose the website you want to connect, you will find all the details you need.

If you use the terminal, you can simply copy and paste the command generated for you in the SSH section to connect immediately (you still need to enter your password, of course).

Kinsta SSH Command

Putty setup

This section is for Windows users, if you are on Mac or Linux, skip to the next section. After downloading Putty, you can run it by double-clicking on the icon. You’ll see a screen that looks something like this:

Putty on Windows

You can get started right away by entering your server address in the Hostname input field. Enter the port number next to it in the port field, make sure the protocol is set to SSH and click Open at the bottom of the page.

You should see a window that looks similar to a Linux terminal. It will ask for your username, which you should enter and hit enter. Do the same with your password, hit enter and after a few moments you should be logged in.

On the way you can receive a notification about RSA fingerprints or other issues. You are welcome to press OK to continue.

Sign up for the newsletter

Would you like to know how we increased our traffic by over 1000%??

Be one of the 20 000+ people who receive weekly newsletters with insider tips about WordPress!

Connect via SSH in the terminal

This section is only for Mac and Linux users, if you are a Windows user and have already set up Putty, skip below.

On Mac or Linux you just need to open the terminal and run a command. The command has the following form:

Replace the information with your current username, hostname and port number and press Enter. You will be asked for your password, which you have to enter and confirm with Enter. If you receive notifications about RSA fingerprints or other issues, feel free to press enter or "y" to continue.

Issue SSH commands

From this point on, the experience is the same whether you are on Windows or Mac. You now have the possibility to issue commands as you would do it in the terminal on your own computer. There are lots of neat things you can do, especially if you are on a Kinsta server!

SSH opening message on Kinsta

SSH opening message on Kinsta

A word of warning. SSH access usually gives you much more freedom than you would normally have. This includes the ability to screw things up royally. You could delete your entire WordPress directory, all your images, stop important services on your server. Always be careful when using SSH, you can do a lot of damage.

Use of WP-CLI

WP-CLI is a command line interface for WordPress and provides you with all kinds of neat tools. Kinsta servers have WP-CLI available out of the box, so you can use it immediately after logging in. For other servers you may need to install it yourself, check out the website for more information.

Once you are functional with WP-CLI, you can execute some commands! For this you need to change to a directory with WordPress installed. If you are not sure where you are at the moment, you can use the ls command to display the contents of the current directory.

At Kinsta you get into the home directory of your website. You have to navigate to the public directory with cd public to get to the WordPress root directory.

Type wp plugin list to get a list of all plugins available for the site.

WP-CLI Plugin List

To do something more helpful, you can run wp plugin update –all , which would update all your plugins at once, or wp plugin update –all –dry-run , which gives you a list of plugins that would be updated if you ran the first command.

There are many useful commands WP-CLI commands, see documentation for more information.

What else can I do?

The short answer is almost everything. You can now use tools like Git, Composer, WP-CLI and others to gain more control over your site and deployment environment.

If you are a Kinsta Enterprise client, you can even use tools like npm. SSH is a great tool for interacting with your server, and it’s pretty easy to get started with it. Happy SSH-ing!

Save time, money and maximize your site’s performance with:

  • Quick help from WordPress hosting experts, 24/7.
  • Cloudflare Enterprise Integration.
  • Global reach with 29 data centers worldwide.
  • Optimization with our integrated application performance monitoring.

All this and much more, in a plan with no long-term contracts, assisted migrations, and a 30-day money-back guarantee. Check out our packages here or talk to sales to find the right plan for you.

Handpicked list of similar articles

WordPress wallpapers


WordPress wallpapers: How to add, edit and customize them

How to connect to your server via ssh


How to speed up your WordPress site

7 easy ways to check disk usage in WordPress (find large files and data)


Like this post? Please share to your friends:
Leave a Reply

;-) :| :x :twisted: :smile: :shock: :sad: :roll: :razz: :oops: :o :mrgreen: :lol: :idea: :grin: :evil: :cry: :cool: :arrow: :???: :?: :!: