Skip to content

Contact

Mexico City, Mexico
Available for remote and on-site projects.

Professional networks

LinkedIn · GitHub · Email
Applied engineering, measurable results.

How to verify SSH access before the first day of work

· 4 min read · Samuel Torres

On Friday, November 27, a coworker sent me a message: can you confirm that the access to the client's server works? The team was going to start working there on Monday the 30th, and nobody wanted to find out that day, with everyone waiting, that the door would not open.

Verifying access before the first day of work sounds like paperwork, but it is real work. Monday should not be lost to permissions, passwords and keys; Monday is for working. Twenty minutes of verification on Friday can save you a whole morning on Monday. And what I found that Friday taught me several lessons, so I am writing them down here, step by step, just as I did them.

Step 1: make sure the port responds

The first step was the simplest one: checking that the port responded. A server that does not respond on its port is not a server you can work with: it may be turned off, the port may be closed, or the address may have been copied wrong. A response does not mean you can get in, but no response means you definitely cannot. In this case it responded, so I moved on.

This step looks obvious, and that is exactly why it is the one people skip the most. When something fails on Monday, the first thing people check is the code or the project configuration, and it turns out the problem was much lower down: nobody had checked that the server was there. Five minutes on Friday tell you whether the server exists and is listening.

Step 2: read the server banner

The second step was reading the server banner. When you connect to an SSH server, the first thing it does is introduce itself: it tells you which protocol it speaks and which software it runs, without asking you for any credentials. The banner said SSH-2.0 with OpenSSH 10.2, on Ubuntu. With that I already knew two things: that what is listening on that port is a real SSH server, and which version it runs. If the banner had said something else, or nothing at all, it would have been a sign that something was wrong and that it was not worth testing blindly.

Reading the banner is free and you do not need any credentials to do it. It is the fastest way to confirm that you are talking to the right service and not to something else that someone put on that port by accident.

Step 3: try the password and read the error

The third step was trying to log in with a password. The attempt failed with the message "Permission denied (publickey)". It sounds like failure, but it is actually information: the server does not accept passwords, only a key. The message tells you exactly which authentication method it expects. If you do not know how to read it, you spend the morning trying passwords that will never work.

This is the error that confuses people the most when they have not seen it before, because it seems to say that everything is wrong. It does not: the server is working perfectly, it is just rejecting the method you used. The right answer is not to keep trying the password, it is to look for the key.

Step 4: log in with the key

The fourth step was logging in with the key. The key came in a ZIP attached to the email with the access details. Before using it there was a security pause that I describe in another article: the system flagged the attachment as content that could run code when processed, so I did not use it until I had explicit approval to test it. Once it was approved, the login worked on the first try: the key is Ed25519 and has no passphrase, so it went straight in.

Working on the first try is not luck: it is the result of having checked each layer first. Port, banner, authentication method and key, in that order. If something had failed, I would have known exactly which layer the problem was in.

Step 5: write it down

At the end I documented how to get in: with a key, on a non-standard port, no password, and that the key works. I wrote it down so that on Monday nobody has to guess or ask. The verification is not worth much if it only stays in my head: on Monday another coworker arrives, opens the document and gets in.

The lesson

Verify access before the first day of work. A port that responds does not mean you can get in, a permission error can be the server telling you how it wants you to log in, and a key that arrives by email is not used blindly. All of that can be checked in twenty minutes, and Monday starts with work, not with fighting the door. Get a quote on WhatsApp in 2 min

Samuel Torres Pichardo

Samuel Torres Pichardo
Software and cloud engineer in Mexico City, with about 3 years of professional experience.
About me · LinkedIn · GitHub · Contact

Got a project in mind?

Hire me: I'll help you build it.

Websites, online stores, custom systems and cloud. Tell me what you need and I'll tell you how I'd build it, what it costs and how long it takes.

  • Mexico City · remote

Menu

Español

samuelnegociosnegocios@gmail.com