Anime-Sanctuary

Your first SSH connection

Your new machine is waiting, but no window opens: everything starts with a first SSH connection. Here's how to get in, check you're in the right place, get back out, and stay calm at the first error.

Course
Tutorial 7 of 35
Time
20 min to read
Tested with
Debian 13.7 (trixie), OpenSSH 10.0p2
What you will be able to do
  • Start a first SSH connection to a brand-new machine.
  • Read the fingerprint question and answer it without getting it wrong.
  • Check in two commands that you are really on the server.
  • Disconnect cleanly and recognize the first error.

Before you start: What is SSH?, Install Debian 13 on a VPS or a dedicated server.

Contents
  1. 1. Gather what you need
  2. 2. Start the connection
  3. 3. Answer the fingerprint question
  4. 4. Type the password
  5. 5. Check where you are
  6. 6. Log out, then come back
  7. If it fails
  8. What comes next
  9. Sources

Your machine is installed, but it has no screen and no keyboard. How do you get in the first time? With an ssh command typed in your own computer's terminal, followed by one question you must answer with care. Then you check that you are really on the server, and you leave without breaking anything. The words SSH, terminal and fingerprint are explained in What is SSH?, and the machine comes from Install Debian 13 on a VPS or a dedicated server.

1Gather what you need

For the first connection you need three pieces of information. Your hosting provider gives them to you, or you chose them during the install. Write them down before you start; they fit on a scrap of paper:

  • the host, the address of the machine, for example 203.0.113.10;
  • the user, the account that came with the machine, most often root (or alice, if you created that account with the ISO installer);
  • the password of that account.

root is a Linux machine's all-powerful account: it can read, change and erase anything. With most providers it is the only account at first, and we'll create yours later. If you created alice, replace root with alice everywhere. The commands are the same.

You also need a terminal open on your computer, as at the start of What is SSH?. The examples use a machine called mon-serveur, at the address 203.0.113.10. Swap in your own values.

First, check that the ssh program is there, because nothing works without it.

On your computer
ssh -V
Expected output
OpenSSH_10.0p2 Debian-7+deb13u4, OpenSSL 3.5.7 9 Jun 2026

Your version number will probably differ, and that is fine. Any answer that looks like this one is enough. The program is ready, so on to the connection.

2Start the connection

You open the connection with ssh, followed by the user, an at sign (the @ you met in What is SSH?) and the host. Type the command below with your own values, then press Enter. On Windows, the same line works in Terminal or in PowerShell.

On your computer
ssh root@203.0.113.10
Expected output
The authenticity of host '203.0.113.10 (203.0.113.10)' can't be established.
ED25519 key fingerprint is SHA256:J7SVxQS7TGXBz5Vi/yr3MC9Q6kizl66qzkGBgS7Uht4.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])?

This question isn't an error. Your computer has never talked to this machine before, and it asks whether this is the right one. The answer depends on the fingerprint on screen, and this is the only moment you can check it.

3Answer the fingerprint question

Before you answer yes, compare the fingerprint on screen with the one your machine really has. If they match, you are talking to the right machine. The fingerprint is the string of characters after SHA256:. It identifies the machine the way a fingerprint identifies a person. If an intruder sat between you and the server, theirs would be different.

Where do you find the real one? Either in your provider's customer panel, or in its remote console (a virtual screen and keyboard) with the command ssh-keygen -lf /etc/ssh/ssh_host_ed25519_key.pub. The details are in Install Debian 13 on a VPS or a dedicated server. Here's what you need to decide:

  • The two fingerprints are identical: type yes in full, then Enter.
  • They differ: type no, enter no password, and warn your provider.
  • You have no way to compare: stop with no and look for where your provider shows it. Losing fifteen minutes beats handing your password to a stranger.

Here is the whole dialogue, including the comparison that only you can make, in the middle.

The dialogue of a first SSH connection Your computer asks to connect, the server sends its fingerprint, you compare it with the one in your customer panel, then you answer yes and type the password, and the server opens the session. Yourcomputer Theserver 1. I want to connect 2. my fingerprint 3. you compare it with theone in your customer panel 4. yes, then password 5. you are in
Text version: Your computer asks to connect (1). The server answers with its fingerprint (2). You compare that fingerprint with the one shown in your provider's customer panel (3). If they match, you type yes and then the password (4), and the server opens the session (5).

After yes, SSH remembers the machine in the known_hosts file ("known hosts") on your computer. You won't see this question again, unless the fingerprint changes one day. What is left is proving who you are.

4Type the password

After the yes from the previous step, the machine asks for the account password. Nothing appears while you type: no dots, no stars. That is on purpose, so a nosy neighbor cannot count your letters. Type it blind, then press Enter. Pasting works too (on Windows, with a right-click in the window). Below is the rest of the session, and the yes isn't a separate command.

On your computer, after the fingerprint question
yes
Expected output
Warning: Permanently added '203.0.113.10' (ED25519) to the list of known hosts.
root@203.0.113.10's password:
[...]
root@mon-serveur:~#

The dots in square brackets hide a welcome message from Debian, which differs from one machine to the next. The last line is what matters. If it appears, you are inside the server: everything you type now runs on it, no longer on your computer. But how can you be sure?

5Check where you are

The last line, the prompt, tells you who you are and where. root@mon-serveur:~# reads "root, on the machine mon-serveur, in the home folder". The ~ stands for that home folder, and the # reminds you that you are root. For an ordinary account like alice, the # would be a $. Two small commands confirm all this.

On the server (you are connected)
whoami
Expected output
root

whoami ("who am I") prints the account you are using. The next command, hostname, prints the name of the machine, and it is the one that proves you are no longer on your own computer.

On the server (you are connected)
hostname
Expected output
mon-serveur

If the name is your server's, you are in the right place. Keep the habit: before any command that changes something, read the prompt to see which machine it will hit. Still, don't linger here, because root has no safety net. Users, sudo and file permissions will give you an ordinary account. For now, let's learn to leave.

6Log out, then come back

To close the connection, type exit and press Enter. The shortcut Ctrl + D (both keys together) does the same. Closing the window works too, but exit shuts the door properly.

On the server (you are connected)
exit
Expected output
logout
Connection to 203.0.113.10 closed.

Your own computer's prompt is back. The server keeps running without you, which is its whole job. Now reconnect with the same command as in step 2 and compare.

On your computer
ssh root@203.0.113.10
Expected output
root@203.0.113.10's password:
[...]
root@mon-serveur:~#

No fingerprint question this time, because your computer already knows the machine. If the fingerprint changes one day, don't answer lightly: see "If it fails". First, let's meet the everyday errors before they surprise you.

If it fails

Five messages come up most often: a refused password, an unknown address, a silent machine, a closed door, or a changed fingerprint. Here is the first one, by far the most common. It appears after three failed tries, often because nothing shows while you type.

On your computer
ssh root@203.0.113.10
Expected output
root@203.0.113.10's password:
Permission denied, please try again.
root@203.0.113.10's password:
Permission denied, please try again.
root@203.0.113.10's password:
root@203.0.113.10: Permission denied (publickey,password).

The second case comes from a typo in the address. With a name instead of a number, it looks like this:

On your computer
ssh root@mon-servuer
Expected output
ssh: Could not resolve hostname mon-servuer: Name or service not known

The other messages read in the same spirit:

  • Connection timed out: the machine doesn't answer at all. Check the address, then check in the customer panel that the machine is switched on.
  • Connection refused: the machine answers, but nobody listens at that door. Right after the install, wait one to three minutes and try again.
  • REMOTE HOST IDENTIFICATION HAS CHANGED: the fingerprint is no longer the one your computer remembered. Don't type yes before you have compared the new fingerprint with your provider's.

These last three, with their exact output and their fix, are covered in the "If it fails" section of What is SSH?. You can now get in and get out. What is left is knowing what to do once you are inside.

What comes next

You got into your server, checked where you were and walked back out. But once inside, there is no icon and no menu, only a prompt that waits. The next article, The terminal for beginners, teaches you to find your way around, and to read and create files. It comes now because every later article relies on these steps.

Sources (accessed November 4, 2026)

  • OpenSSH: ssh(1), ssh-keygen(1).
  • Commands: tested on Debian 13.7 (OpenSSH 10.0p2). Not tested: Windows.