Using the "SSH Shell Access" in my Cpanel I have added my public and private key in the import key section and I also have authorised them. But I am getting this "Connection timed out" error on port 22. I have WHM access. How can I solve this connection timeout issue ?

  • 1
    1. check the logs, 2. Try to troubleshoot it, no luck, 3. come here edit your post and paste logs here for others to troubleshoot
    – Rahul
    Jun 13, 2016 at 11:00
  • Sorry I am really new into this. I tried to analyse the log. From Log section in cpanel I tried different logs. I tried raw log history too. But nothing related to ssh access log. I tried error logs too but that is empty.
    – hash71
    Jun 13, 2016 at 11:28

2 Answers 2


1) Try to ping the host for checking the connection.
2) Confirm if SSH is listening to 22 or is listening on other port
3) telnet host 22 to check the ssh connectivity
4) From client you can try o ssh -vvv user@host in order to try to debug the ssh connection

  • I tried telnet host 22 but I am getting - "telnet: connect to address x.x.x.x: Operation timed out telnet: Unable to connect to remote host". what should I do next ?
    – hash71
    Jun 13, 2016 at 15:46
  • you have to check the logs of ssh connection. SSH auth failures are logged here /var/log/auth.log The following should give you only ssh related log lines grep 'sshd' /var/log/auth.log
    – igiannak
    Jun 13, 2016 at 21:45

I was with the same problem and I found a solution:

Try this command line in your terminal:

ssh -i my_key -p 21098 [email protected]
  • my_key : my private key SSH
  • 21098 : my port (you can use 22 or other port)
  • root : my user
  • my server

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .