This article explains how to set up and use SSH (Secure Shell) to establish a secure connection to your web hosting account. SSH allows you to access your server, manage files and execute commands over an encrypted connection.
Setting up SSH on the server
You need the following to use SSH:
- An SSH client: The OpenSSH client comes pre-installed on modern operating systems. Simply open the command line (“cmd.exe” for Windows, “Terminal” for Linux or macOS). If the ssh command works, then a corresponding client is installed.
- Your hosting username (also referred to below as the “main account”)
- The corresponding password or an SSH key pair
Once you have everything needed, proceed as follows to set up SSH:
- Log into the Hostpoint Control Panel using your Hostpoint ID.
- Open your web hosting or Managed Flex Server.
- In the “Server Overview”, under “Identity” at the bottom right, you’ll find the required name for the account you need to connect to. For Managed Flex Server, the hostname is displayed at the top right next to “SSH”.
- In the menu on the left, under “Advanced” > “SSH Access”, make sure that SSH access is enabled. Our recommendation for the “Active Shell” is to just use the default “bash”.
- If you would prefer to log in with an SSH key instead of a password, you can add your public key here. For more information on logging in with and generating an SSH key, please refer to section 2.2.
Tip: You can also store several keys, for example so that your webmaster can access the server via SSH without having to know the password. - You can set a password for your hosting account under “Advanced” > “Password Change”. This is not the password for your Hostpoint ID, but a separate password for SSH, SQL and FTP access with the hosting’s main account.
→ SSH has been set up. You can now connect to your web hosting/server via SSH.
Establishing an SSH connection
When establishing a connection via SSH, there are two ways to log in:
- With username and password
- With username and SSH key
With password
- Start the terminal and enter the following data:
If you are using the Windows 11 SSH client, you must specify the option -m hmac-sha2-512 in the command for the connection to be established correctly. The command then looks like this:
ssh -m hmac-sha2-512 MainAccount@MainAccount.ssh.cloud.hostpoint.ch
- When you connect to a server for the first time using SSH, you may be asked whether you want to trust the “fingerprint”. For security, you can compare the IP address in the message with the IP address in your DNS zone. You can then establish the connection by entering “yes”. You can find out how to have our fingerprints checked automatically in our article “What are common problems in accessing with SSH?”.
- Enter the password specified in section 1 for your main account.
→ If a connection has been successfully established, the following page is displayed:
With SSH key
In the following instructions, we use a Windows 11 example to show you how to generate an SSH key and use this to establish a connection.
The advantage of logging in with an SSH key is that you do not need to use or potentially disclose to others your web hosting password for this. You can create a specific SSH key for each person (e.g. for yourself and for your webmaster).
You can also add the same SSH key to multiple web hostings, so you don’t have to remember different passwords.
We strongly recommend that you protect your SSH key with a passphrase. Otherwise, anyone who has access to your computer could also access and copy your SSH key. The passphrase must be entered once when connecting via SSH.
Generating a key
To log in with an SSH key, the key must first be generated and saved.
- Enter “Power” in the Search field in the taskbar located at the bottom of the screen and click “Open” in the right pane. The PowerShell console opens and your home directory is displayed:
PS C:\Users\your_home_directory - Create a new directory in your home directory with the following command:
mkdir .ssh - Change to the new directory with the following command:
cd .ssh - Generate an SSH key in the new directory with the following command:
ssh-keygen -t ed25519 - Think up a secure passphrase and enter it twice.
Important: Make sure you can remember the passphrase. If you forget it, you will no longer have access to the SSH key and it will need to be re-generated. - Press the ENTER key.
→ The SSH key has been generated and stored on your computer.
Establishing an initial connection
- Enter the following command to establish a connection via SSH key for the first time.
- Enter your personal passphrase.
- When you connect to a server for the first time using SSH, you may be asked whether you want to trust the “fingerprint”. For security, you can compare the IP address in the message with the IP address in your DNS zone. You can then establish the connection by entering “yes”. You can find out how to have our fingerprints checked automatically in our article “What are common problems in accessing with SSH?”.
→ If a connection has been successfully established, you will see the following page:
Copying the SSH key to the server
Now you have to copy the SSH key to the server. Follow these steps:
- After the $ symbol, enter exit and press the ENTER key.
- If you are still in the directory PS C:\Users\info\.ssh>, type cd ../../.. and press the ENTER key again. You are now in the directory PS C:\>.
- To copy the generated key to your server, type the following command:
type $env:USERPROFILE\.ssh\id_ed25519.pub | ssh -m hmac-sha2-512 MainAccount@MainAccount.ssh.cloud.hostpoint.ch "cat >> .ssh/authorized_keys" - Close all open terminal windows.
→ The SSH key has been copied to the server.
Establishing a connection
Now that the key is stored both on the server and on your computer, you can connect to the server via SSH.
To do this, open Windows PowerShell again and type the following command:
→ You have now connected to the server via the saved SSH key without having to enter a password.
Saving your connection data
For even greater convenience, you can save your connection data in the SSH configuration file. This way, you will no longer have to enter the data if you want to establish an SSH connection.
Follow these steps:
- Create a file with the name config in the C:\Users\your_home_directory\.ssh directory by right-clicking there in Explorer and selecting “New” > “Text Document”. Please make sure that you first click on “View” > “Show” > “File name extensions” in the ribbon to see the file extension .txt.
- Open the file by double-clicking it and edit it as follows:
What | Values |
---|---|
Host | hostpoint (user-definable) |
HostName | MainAccount.ssh.cloud.hostpoint.ch |
User | MainAccount |
Port | 22 |
MACs | hmac-sha2-512 |
As always, you need to replace MainAccount with your username.
The content of the file then looks like this, for example:
Host hostpoint
HostName MainAccount.ssh.cloud.hostpoint.ch
User MainAccount
Port 22
MACs hmac-sha2-512
- Save and close the file.
- Remove the file extension .txt and confirm.
- You can now hide the file name extensions again if you want.
→ The configuration file has been saved. The next time you want to connect to the server via SSH, all you need to do is enter the command ssh hostpoint. The required connection data is then automatically retrieved from the file.
For support requests please use this form instead.