SSH How-To: Connect Securely to Linux Systems

SSH is the standard way to open a secure remote shell on a Linux or Unix system. It encrypts authentication and session traffic and is the normal replacement for Telnet-style remote administration.

Basic connection

ssh user@server

Use -p when the server listens on a non-default port:

ssh -p 2222 user@server

Keys are preferable to reusable passwords

For regular administration, use an SSH key pair and protect the private key with appropriate local permissions and, where practical, a passphrase.

ssh-keygen
ssh-copy-id user@server

Useful checks

  • Use ssh -v when troubleshooting connection or authentication problems.
  • Verify the server host key when connecting to a system for the first time.
  • Avoid exposing SSH unnecessarily; firewall rules, VPN access, and key-based authentication all help reduce risk.

Leave a Comment