If I am trying to ssh or telnet to an Ubuntu Server, and both connections are rejected or refused!

I can ping the server, firewall off.

What are troubleshooting steps should I take?

(I am far away from the Server, so console solution isn't available).

  • Similar issue for me on my VirtulBox Guest ubuntu happening. Ping working, telnet to ssh port 22 is working but when I have started WebLogic server it is not able give access, connfection refused. What is the solution for this issue? How to fix it? – PavanDevarakonda Jun 9 '14 at 5:32
  • check if service are listening on that ports use this command "netstat -ntlp" – PKumar Oct 14 '15 at 8:10

You can determine if programs on the server are listening to the ssh and telnet ports (22 and 23, usually), by:

nmap -T4 -A -v -PE -PS22,23 -PA22,23 <ServerIP>  


telnet <ServerIP> 22  
telnet <ServerIP> 23  

If your error message is: telnet: Unable to connect to remote host: Connection refused the problem is on the remote server (no program is listening to that port). It's not running the telnet or ssh daemon,or running them on non-standard ports

| improve this answer | |

Make sure your telnet daemon and ssh is running in ur remote system.

In ubuntu ,

To enable telnet daemon, "sudo apt-get install telnetd" To enable ssh client and server ."sudo apt-get install ssh-connection"

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.