Skip to main content

Adding and Removing a Separate User on the Server

Instructions for granting and revoking developer SSH access using public SSH keys, resetting the SSH password (wp-reset-ssh-password), and restricting SSH access at Seravo.

In Seravo's hosting environment, each site has one site-specific SSH/SFTP user account, and separate Linux user accounts are not created on the server. When you want to grant an external developer or team member access to the server without sharing the main SSH password, access is granted and revoked by managing public SSH keys in ~/.ssh/authorized_keys.

Prerequisites

  • SSH access to the server: You need a working SSH connection to the site, or the person adding the key must already be logged into the server (see How to Connect to Your WordPress Site via SSH/SFTP).

  • The user's public SSH key: Ask the developer for their public SSH key (the contents of their .pub file, e.g., ssh-ed25519 AAAA...). Never ask for or share a private key.

Adding an SSH Key to the Server (Granting Access)

With a public SSH key, a developer can log in to the server using their own key pair without needing the site's SSH password.

Option 1: Your Own Public Key (ssh-copy-id)

If you are adding the public key from your own computer, transfer it with a single command from your local terminal (replace port 12345, the username, and the server hostname with your site's details):

ssh-copy-id -i ~/.ssh/id_ed25519.pub -p 12345 [email protected]

Option 2: Adding an External Developer's Key (authorized_keys)

Once you have received the developer's public key as plain text:

  1. Log in to the server via SSH.

  2. Add the public key on its own line in ~/.ssh/authorized_keys (for example, using the nano editor):

    nano ~/.ssh/authorized_keys
  3. Paste the key onto a new blank line. Make sure the end of the line includes the developer's name or identifier (e.g., ssh-ed25519 AAAAC3Nz... [email protected]) so the key is easy to identify later.

  4. Save the file (Ctrl + O, Enter) and exit the editor (Ctrl + X).

Note (Staging Environments / Shadows): Your production site and staging environments (shadows) have separate home directories. If the developer also needs access to a shadow environment, add their public key separately to the shadow environment's ~/.ssh/authorized_keys file.

Removing an SSH Key from the Server (Revoking Access)

When a developer's or contractor's project ends, revoke their access by removing their public key from the server:

  1. Log in to the server via SSH and open the authorized keys file:

    nano ~/.ssh/authorized_keys
  2. Locate the public key line belonging to the person whose access you want to revoke and delete the entire line (in nano, you can cut the current line with Ctrl + K).

  3. Save the file (Ctrl + O, Enter) and exit (Ctrl + X). Access using that key is revoked immediately.

Remember also: If the developer was also given the site's SSH password or their own WordPress user account, reset the SSH password following the instructions in the next section (wp-reset-ssh-password) and remove their account from the WordPress dashboard under Users (see Managing WordPress User Passwords).

Changing the SSH Password (wp-reset-ssh-password)

Each site has one SSH password that is shared between the production site and its staging (shadow) environments.

If the SSH password has been shared externally or you want to rotate it for security reasons, generate a new strong password by running the following command via SSH:

wp-reset-ssh-password

The command prints the new password to your terminal and activates it immediately. If you have lost your current password and cannot connect using an SSH key, our customer support team can reset it for you.

Restricting SSH Access

To maximize security, we recommend restricting SSH and SFTP access whenever possible:

  • Disabling password authentication: Password logins can be disabled completely so that authentication is only possible using SSH keys listed in ~/.ssh/authorized_keys.

  • IP address restrictions: SSH and SFTP connections can be restricted to allow logins only from specific static IP addresses (such as your office or VPN IP address).

Both restrictions can be enabled upon request by contacting Seravo's customer support.

Common Issues and Troubleshooting

  • An added SSH key does not work when logging in: Verify that the entire public key is placed on a single unbroken line in ~/.ssh/authorized_keys (without line wraps in the middle of the key) and that you pasted the .pub public key rather than a private key.

  • wp-reset-ssh-password was run, and existing SFTP connections now fail: Remember to update the new password in your SFTP client (such as FileZilla), or switch to SSH key authentication.

  • Re-enabling password authentication or updating an IP restriction: If your office IP address changes and an IP restriction blocks your connection, contact customer support to update the allowlisted IP address.

See Also

By managing public SSH keys, you can safely grant and revoke server access without sharing your main SSH password. If you have lost your SSH password or would like to enable password-login restrictions or IP allowlisting, please contact our customer support team at [email protected].

Did this answer your question?