Table of Contents
To connect to an SSH server you’re authorized to use, open a terminal and run ssh username@server.example.com. Replace the placeholders with the remote account and server address. Add -p before the destination if the administrator gave you a port other than 22.
Connect with the OpenSSH client
- Windows: Open Windows Terminal or PowerShell and run
ssh -V. If the command is missing, search Settings for Optional features and install OpenSSH Client. See Microsoft’s SSH client guide. - macOS: Open Terminal from Spotlight or Applications > Utilities.


- Linux: Open a terminal. If
sshis missing, install the OpenSSH client using your distribution’s package manager.
ssh username@server.example.com
ssh -p 2222 username@server.example.com



Verify the host key and sign in
On the first connection, compare the fingerprint displayed by the client with the fingerprint your administrator provides through a trusted channel. Accept it only if it matches. If a previously known key changes, stop and confirm the reason with the administrator. After verification, enter your account password if the server allows it, or use the private key that matches the public key registered for your account. Never share the private key. To select a particular key file, use ssh -i path/to/private-key username@server.example.com.


Use PuTTY on Windows if you prefer a graphical client
Enter the hostname and port, select SSH, and click Open. Check the fingerprint in the first-connection dialog before accepting. Enter the remote username and sign in using the method your administrator provided.



Troubleshoot a failed connection
- Timeout: Verify the address and whether your network requires a VPN or other approved connection.
- Connection refused: Confirm the port with the administrator and check whether the SSH service is running if you manage the server.
- Permission denied: Check the remote account name and whether it accepts your selected key or password method.
Type exit when you are done to close the remote session.
Reader Comments 0
Sign in with email or Google to join the discussion.