ssh:connect to host restart port 22: Connection refused
Hi guys I am getting "ssh:connect to host restart port 22: Connection refused" error when trying to start "ssh" in Ubuntu. I uncommented the port 22 in ssh_config, I dont have iptables setup...Did try to check if the port is listening using the netstat -an | grep "LISTEN" & couldnt find. Any solutions pls......
VIJNB |
Quote:
BTW, this thread will likely be moved to a more appropriate forum, as it's not a security issue (at least not directly). |
ssh:connect to host restart port 22: Connection refused
Hey thanks for your reply, checked the sshd_config, its also in port 22, any other solution
|
Do you have some other means of accessing the remote box? The objective being to make sure it's actually listening on that port, and that there are no interfering firewall rules. If the remote box sits behind a dedicated firewall, you'll want to check that too.
|
No I dont have a remote box as I am trying this in stand alone Ubuntu & I did install the openssh-server, I am first trying to start the server.
|
Quote:
Code:
sudo /etc/init.d/ssh start |
Yes I got the server started message, but when I tried to stop / start manually, it gave me the message, any clue??, I used the same code : sudo /etc/init.d/ssh start ....still getting the same error!!!!!
|
Quote:
Code:
sudo netstat -pantu | grep LISTEN |
the output is
Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 936/cupsd tcp6 0 0 ::1:631 :::* LISTEN 936/cupsd udp 0 0 0.0.0.0:68 0.0.0.0:* 979/dhclient udp 0 0 0.0.0.0:5353 0.0.0.0:* 789/avahi-daemon: r udp 0 0 0.0.0.0:47477 0.0.0.0:* 789/avahi-daemon: r |
What about the output of:
Code:
sudo /etc/init.d/ssh restart |
Quote:
|
Quote:
What about: Code:
ls -l /etc/init.d/ssh Code:
head /etc/init.d/ssh |
Quote:
root@mgroms:~# ls -l /etc/init.d/ssh -rwxr-xr-x 1 root root 3878 2009-10-22 15:50 /etc/init.d/ssh root@mgroms:~# head /etc/init.d/ssh #! /bin/sh ### BEGIN INIT INFO # Provides: sshd # Required-Start: $remote_fs $syslog # Required-Stop: $remote_fs $syslog # Default-Start: 2 3 4 5 # Default-Stop: 1 # Short-Description: OpenBSD Secure Shell server ### END INIT INFO |
That looks sane. I'm not sure what to make of this. Since this is such an early stage, would you be willing to re-install the SSH daemon package? It would go like:
Code:
sudo apt-get remove --purge openssh-server |
FWIW, this is what the installation looks like on my Ubuntu 8.10 box:
Code:
win32sux@candystore:~$ sudo apt-get install openssh-server |
All times are GMT -5. The time now is 09:06 AM. |