How do I make an SSH connection to my VPS?
SSH lets you work on your VPS from the command line. Every VPS includes SSH access at user level: you connect as a DirectAdmin user, and only with an SSH key. SSH access is disabled by default; you enable it yourself for the user you want to connect as.
Before you start
- You need the login details of the DirectAdmin admin user.
- You need an SSH key pair. If you do not have one yet, create it on your computer with
ssh-keygen -t ed25519. Do not use a DSA key: OpenSSH has not supported DSA since version 10.0. - On Windows, you use PowerShell. This requires the OpenSSH client, an optional feature of Windows (from Windows 10 build 1809). To see whether it is installed, run
Get-WindowsCapability -Online | Where-Object Name -like 'OpenSSH*'in PowerShell as an administrator: ifOpenSSH.ClientshowsNotPresent, install it withAdd-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0. Microsoft explains this on this page. - DirectAdmin is in English by default, so the menus and buttons in this article are named as you see them on screen. If your DirectAdmin is set to Dutch, DirectAdmin may show the Dutch names, such as Toon Alle Gebruikers instead of Show All Users, Beheer gebruikers pakketten instead of Manage User Packages, Zich voordoen als instead of Impersonate and SSH Sleutels instead of SSH Keys.
Allowing your IP address
SSH can only be reached from an IP address that is on the whitelist of your VPS's firewall. That firewall is csf (ConfigServer Security & Firewall). You can see your IP address on this page (in Dutch).
Log in to DirectAdmin as admin
Open the firewall
Under Extra Features, click ConfigServer Security & Firewall.
Allow your IP address
Type your IP address in the field next to Quick Allow and click Quick Allow.
Enabling SSH access
SSH access is a setting of the user's package.
Log in to DirectAdmin as admin
Open Show All Users
Under Account Manager, click Show All Users.
Open the user
Click the name of the user you want to connect as via SSH.
Check SSH access and the package
Click the Account Info tab. Package shows the user's package. Under Features, Shell Access (SSH) shows Enabled or Disabled. If it shows Enabled, continue with "Adding your key" below.
Open Manage User Packages
Under Account Manager, click Manage User Packages.
Open the package
Click the name of the user's package. The Edit Package page opens.
Enable SSH access
Tick SSH Access. The package applies to every user who has it: the other users on this package then get SSH access too.
Save the package
Click Modify.
Adding your key
Log in to DirectAdmin as admin
Open Show All Users
Under Account Manager, click Show All Users.
Open the user
Click the name of the user you want to connect as via SSH.
Continue as the user
On the user's page, click Impersonate. You are now working in DirectAdmin as this user.
Open SSH Keys
Under Advanced Features, click SSH Keys.
Paste your public key
Click Paste Key. In the Paste Authorized Key window, paste the contents of your public key into the Line field. This is the file ending in
.pub, for example~/.ssh/id_ed25519.pub, or on WindowsC:\Users\<your name>\.ssh\id_ed25519.pub.Save the key
Click Create.
Connecting
You connect using your VPS's hostname. You can find it in the email you received when your VPS was delivered, for example pvm-klantnaam.hsqd.nl.
Enter a domain name, such as pvm-klantnaam.hsqd.nl.
Open a terminal on your computer
On Windows, that is PowerShell.
Connect
Type this command, replacing
usernamewith the user's name:ssh -p 7198 username@pvm-klantnaam.hsqd.nlSSH runs on port 7198 on every VPS.
Confirm the server
The first time,
sshasks whether you want to continue connecting to this server. Typeyes; the server is then added to the list of known servers on your computer.
Not working?
- After Impersonate, is there no SSH Keys in the menu? Then SSH access is still disabled for this user.
- If you cannot connect, check that your current IP address is on the whitelist.
- Can you no longer reach DirectAdmin or your email either? Then you may have been blocked after too many failed login attempts. In that case, send us your IP address.
Still stuck? Contact us (in Dutch).
Thank you for your feedback.

