In the following article, we’ll show you how to generate an SSH key for Windows 11 and Mac and use it to establish an SSH 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.
Windows
Generating an SSH 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, because this must be entered once when logging in to the SSH client. If you forget it, the existing private key can no longer be used. In this case, you must generate a new SSH key and upload the public key to the server again. - Press the Enter key.
→ The SSH key pair (private key and public key) has been generated and stored on your computer.
Copying the SSH key to the server
Now you have to copy the SSH key to the server. You can do this directly in the PowerShell. Alternatively, you can also add the SSH key in the Hostpoint Control Panel.
PowerShell
- 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"Info: Note: Always replace the username MainAccount with your own details from your Hostpoint Control Panel. - After entering this command, you will be prompted for a password. Now enter the password for the main account.
Info: Note: The password for your main account can be set independently in the Hostpoint Control Panel. Log in to your web hosting account, go to “Advanced” > “Password change”, enter a new password, and confirm by clicking “Change Password.” Please note that this is not the password for your Hostpoint ID, but a separate password used for SSH, SQL, and FTP access with your main hosting account. - Close all open PowerShell windows.
→ The SSH key has been copied to the server.
Hostpoint Control Panel
- Open Windows PowerShell and open the public key in PowerShell using the following command:
Get-Content "$env:USERPROFILE\.ssh\id_ed25519.pub" - Use the mouse to select the text and copy it to the clipboard.
- In the Hostpoint Control Panel, you can add it under “Advanced” > “SSH Access” > “Edit SSH Authorized Keys”:

- Paste the text from the clipboard into the “Authorized Keys” field and save it by clicking the “Save” button.
→ The SSH key has been copied to the server.
Establishing an initial connection
- Enter the following command to establish a connection via SSH key for the first time:
PS C:\Users\your_home_directory\.ssh> ssh -m hmac-sha2-512 MainAccount@MainAccount.ssh.cloud.hostpoint.ch
- 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:
- You have now connected to the server using 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. All you have to do then is enter your personal passphrase once and you are connected.
Mac
Generating an SSH key
To log in with an SSH key, the key must first be generated and saved.
- Search for the “Terminal” app and launch it. Your Mac’s console will open.
- Generate an SSH key with the following command:
ssh-keygen -t ed25519
Important: By default, this command names the SSH key “ed25519” If you want to create more than one SSH key, we recommend creating the second SSH key using the following command:
ssh-keygen -t ed25519 -C SSHkeyName
Using the -C option, you can give the SSH key a custom name. Instead of “SSHkeyName” you can enter the desired name for the SSH key. - You will be asked where to save the key:
Enter file in which to save the key (/Users/username/.ssh/id_ed25519): - Confirm the save location by pressing ENTER, or enter a different directory if desired.
By default, SSH keys on Mac are stored in the /Users/username/.ssh/ directory. That is the location we recommend. - Think up a secure passphrase and enter it twice.
Important: Make sure you can remember the passphrase, because this must be entered once when logging in to the SSH client. If you forget it, the existing private key can no longer be used. In this case, you must generate a new SSH key and upload the public key to the server again. - Press ENTER again.
→ The SSH key pair (private key and public key) has been generated and stored on your computer.
Copying the SSH key to the server
Now you have to copy the SSH key to the server. You can do this directly in the Terminal. Alternatively, you can also add the SSH key in the Hostpoint Control Panel.
Terminal
- To copy the generated key to your server, open the Terminal and type the following command:
ssh-copy-id MainAccount@MainAccount.ssh.cloud.hostpoint.chInfo: Note: Always replace the username MainAccount with your own details from your Hostpoint Control Panel. - After entering this command, you will be prompted for a password. Now enter the password for the main account.
Info: Note: The password for your main account can be set independently in the Hostpoint Control Panel. Log in to your web hosting account, go to “Advanced” > “Password change”, enter a new password, and confirm by clicking “Change Password.” Please note that this is not the password for your Hostpoint ID, but a separate password used for SSH, SQL, and FTP access with your main hosting account. - Close all open Terminal windows.
→ The SSH key has been copied to the server.
Hostpoint Control Panel
- Open the Terminal again and open the public key in the Terminal using the following command:
cat .ssh/id_ed25519.pub - Use the mouse to select the text and copy it to the clipboard.
- In the Hostpoint Control Panel, you can add it under “Advanced” > “SSH Access” > “Edit SSH Authorized Keys”:

- Paste the text from the clipboard into the “Authorized Keys” field and save it by clicking the “Save” button.
→ The SSH key has been copied to the server.
Establishing an initial connection
- Enter the following command to establish a connection via SSH key for the first time:
ssh MainAccount@MainAccount.ssh.cloud.hostpoint.ch
- 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:
- You have now connected to the server using the saved SSH key without having to enter a password.
For support requests please use this form instead.



