HiBlog Networking and Protocols
What Is SSH? How to Connect Securely to a Remote Server
- Mina SeyfollahiAuthor
- Last updated
- 2 minutesReading time
- 876Views
- Mina Seyfollahi
- Last updated:
- 2 min read
- 876 views
SSH, or Secure Shell, lets you use a remote server’s command line over an encrypted connection. After renting a Linux VPS, for example, you can sign in from your laptop, inspect logs, and administer services without being in the same building.
A secure first connection requires two checks. The client needs to verify that it has reached the right server, and the server needs to verify your username and credentials. Get the hostname, port, account name, and host-key fingerprint from a trusted source before connecting.
How SSH protects a session
The client and server negotiate encryption and integrity protection. The server shows a host key so the client can verify its identity. Afterward, the server authenticates you, typically with a key or password. Your public key can be installed on the server. The private key stays on your device.

When to use SSH
Run terminal commands, automate maintenance, or transfer files with SFTP or SCP. SSH can also forward an authorized service connection through an encrypted tunnel. For a full Windows desktop session, see Remote Desktop Protocol.
Make your first connection
Open a terminal with OpenSSH. Replace the sample username and hostname and use the port given by your administrator. The default is TCP 22.
ssh -p 22 admin@server.example.com
ssh -i ~/.ssh/id_ed25519 -p 22 admin@server.example.comUse the first command for a normal login and the second to select a specific private key. Check the first-use fingerprint against the value in your provider console or from your administrator before accepting it.
Diagnose connection errors
A timeout points toward routing or a firewall. A refusal usually means no service is listening at that address and port. If you see Permission denied, check the account and authentication method. If a previously trusted host key changes, verify the new fingerprint before proceeding, even after a reinstall.


