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@serverUse -p when the server listens on a non-default port:
ssh -p 2222 user@serverKeys 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@serverUseful checks
- Use
ssh -vwhen 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.