SSH key management and connection

SSH access to your hosting uses key authentication. You generate a key pair on your own machine, register the public half in your hosting console, and keep the private half secret.

Only ever upload the public key (the .pub file, or the text shown in PuTTYgen). The private key never leaves your computer — anyone holding it can connect as you.

1. Enable SSH access

Sign in to your management console, open one of your domains by clicking it, then click SSH access. SSH must be enabled on the domain before any key will work.

SSH access tile in the management console

2. Generate the key pair

Linux and macOS

1. Generate the key pair

Open a terminal and run:

ssh-keygen -t rsa -b 4096

Follow the on-screen prompts. Accept the default location and set a passphrase when asked.

Generating public/private rsa key pair.
Enter file in which to save the key (/home/username/.ssh/id_rsa):
Your identification has been saved in /home/username/.ssh/id_rsa.
Your public key has been saved in /home/username/.ssh/id_rsa.pub.
The key fingerprint is: ...

2. Display the public key

Replace username with your own account name:

cat /home/username/.ssh/id_rsa.pub

The output is a single long line, of this shape:

ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC8teh2NJ42qYZV98gTNhumO1b6rMYIkAfRVazl
k6dSS3xf2MXJ4YHsDacdjtJ+evXCFBy/IWgdkFtcvsGAMZ2N1RdvhDyQYcy6NDaJCBYw1K6Gv5fJ
... user@swisscenter.com

3. Register it and connect

Copy that entire line into the Public SSH key field of the SSH manager in your hosting console. You can then connect:

ssh console_username@yourdomain.ch

Windows

Download PuTTY and PuTTYgen.

1. Generate the key with PuTTYgen

PuTTYgen key generation window

  1. In Number of bits in a generated key, enter 4096.
  2. Click Generate, then move your mouse around inside the window — PuTTYgen uses that movement as a source of randomness.
  3. Enter a passphrase to protect the key.
  4. Click Save private key and store the resulting file safely (for example key.ppk).

The public key is the text shown in the box at the top of the PuTTYgen window, labelled Public key for pasting into OpenSSH authorized_keys file. Copy it from there into the Public SSH key field of your hosting console — the file saved by Save private key is not the one to upload.

2. Configure the connection

PuTTY session configuration

In the left pane, select Session and fill in Host Name (or IP address) with your hostname or IP address.

PuTTY SSH authentication settings

Then, in the left pane, go to Connection → SSH → Auth. In Private key file for authentication, click Browse and select the private key file you saved earlier.

Return to Session, save the profile, and click Open to connect.

Need help?

If the connection is refused after registering your key, open a ticket with our technical support, mentioning the domain and the username you are connecting with.