Open In App

How to Troubleshoot SSH Connection Issues

SSH client is a program for logging into a remote machine and for executing commands on a remote machine. It is intended to provide secure encrypted communications between two untrusted hosts over an insecure network.

Syntax: ssh [option] [user]@[server_address]



SSH into a Linux Server using a private key or password

Type the ssh command in your terminal (there are two ways to ssh – one using a password and the other one is using a private key )

ssh command using private key and Public DNS:



ssh -i private_key username@Public_DNS

ssh command using private key and Public IP address:

ssh -i private_key username@Public_IP

ssh command using password and public IP:

ssh username@password

Common error while SSH Errors occur while

Connection Timeout

This will occur when any user tries to establish a connection with the server but failed to get the response back within the time period. 

Troubleshooting steps:

Connection Refused

This will occur when the server which is supposed to listen to the request, stops listening. 

Troubleshooting steps:

Host-name Resolution

It happens when the reference to the SSH host can’t be mapped to a network address.

Troubleshooting steps:

Access Denied 

It happens when the ssh failed to connect due to wrong credentials.

Troubleshooting steps:

Permission denied

It happens when the user is not authorized to logging into the server. It is mainly due to the sshd_config file that contains SSH server configuration.

Troubleshooting steps:

Article Tags :