VPS and web hosting
How to connect to a Linux VPS over SSH
Updated on 3 min readThe NeoHost team
What you need
The server’s IP address, the user and the password, from the activation email. On a NeoHost VPS you have root. An SSH client. On Windows 10 and 11, macOS and Linux the sshcommand is already installed and works from the terminal.
The first connection
Open a terminal: on Windows, PowerShell or Terminal; on macOS, the Terminal app; on Linux, any terminal. Type the command below, with your server’s IP address in place of the one in the example. On the first connection, the terminal shows you the server’s fingerprint and asks whether you accept it. Type yes: from now on your computer remembers the server.Type the password. Nothing appears on screen while you type it, not even asterisks; that is normal. Press Enter.
ssh root@203.0.113.10-p, for example ssh -p 2222 root@203.0.113.10.
The first minutes on the server
Change the password with passwd, especially if the email with the password sits in a mailbox other people read.Update the system. On Ubuntu and Debian: apt update && apt upgrade.Set up an SSH key instead of the password (below), so nobody can guess the password any more.
Connecting with an SSH key
On your computer, generate the key with ssh-keygen -t ed25519and press Enter at the questions, or set a passphrase if you want extra protection.Copy the public key to the server. On macOS and Linux: ssh-copy-id root@203.0.113.10. On Windows, copy the contents of the.ssh\id_ed25519.pubfile in your user folder into a new line of~/.ssh/authorized_keyson the server.Connect again with ssh root@203.0.113.10. If you are no longer asked for the password, the key works.
Files over SFTP
If it does not work
Connection timed out: the IP address is wrong or the server is off. Check the address and the server status in the panel.Permission denied: the user or the password is wrong. Watch out for capital letters and a keyboard set to another language.REMOTE HOST IDENTIFICATION HAS CHANGED: the server was reinstalled and has a new fingerprint. Remove the old line withssh-keygen -Rfollowed by the IP address and connect again.
