SSH and Telnet Connection refused
Solution 1
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>
or,
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
Solution 2
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"
Related videos on Youtube
MohammedSimba
Updated on September 18, 2022Comments
-
MohammedSimba over 1 year
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).
-
PavanDevarakonda almost 10 yearsSimilar 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?
-
PKumar over 8 yearscheck if service are listening on that ports use this command "netstat -ntlp"
-