How do you connect to the site over SSH or SFTP?

A WordPress site has a "Direct connection to the files (SSH and SFTP)" page: add a public key on it or create a password, and connect with the site user straight to the site folder.

Updated

Where to find it

This access exists on a WordPress site that runs on a server of its own. On the site page, under "Tools", open "Direct connection to the files (SSH and SFTP)".

You sign in with the site user, hh-app, and it reaches the site folder. It has no full admin access (root), because we keep the server working properly as long as the structure we wrote stays in place. Root access is given through support, to those who agree that we stop looking after the server.

A static site and an app have no SSH access. You see and change the files in the "Files" tool, and you upload a new version from the site page.

The connection line

On the page, under "Connection line", there are two commands ready to copy. In place of SERVER-ADDRESS, the address of the server shows there:

ssh hh-app@SERVER-ADDRESS
sftp hh-app@SERVER-ADDRESS
  1. In a terminal, paste the ssh command, and you get a command line in the site folder.
  2. In an SFTP program such as FileZilla or Cyberduck, fill in the address of the server, the user hh-app, and a key or a password.

Connecting with a key

A key is the recommended way. The private key stays on your computer, and you paste only the public key on the page.

You can add up to 10 keys, and an RSA key must be at least 2048 bits long. To remove a key, press "Remove" on its row.

  1. Under "Public keys", fill in "Name (optional)", for example the name of the computer you connect from.
  2. In "Public key", paste one line that starts with ssh-ed25519, ssh-rsa or ecdsa-sha2.
  3. Press "Add key". The key is saved and the server is updated.

Connecting with a password

Under "SFTP password", press "Create a new password". The password is shown only once, so copy it right away.

The password is kept only on the server, encrypted. A new password replaces the previous one, and that is also the way to go when the password is forgotten.

When connecting does not work

When the message shows that the saved keys are not on the server, for example after a rebuild, press "Apply to the server".

While the site is being uploaded or moved, or when the server does not answer, the access cannot be changed. Refresh the page in a moment.

The site user reaches only the site folder. Settings of the server itself are changed in the tools on the site page, such as "PHP settings" and "Automatic tasks".

A server only, with root access

With a server-only order, access is over SSH as the root user (full admin), with the public key entered in the order. The sign-in line and the fingerprint of the key show on the site page, under "Server access".

When the key is lost, press "Reset the root password" on the site page. The server goes down, gets a new password and comes back up. The password is shown only once and is not kept with us, and it is a good idea to add a new key with it.

Take action

Related articles

Did this article help?

The article did not solve it? Open a support request