Ping works , but unable to do ssh

Posted by gpuguy on Ask Ubuntu See other posts from Ask Ubuntu or by gpuguy
Published on 2013-10-24T09:27:37Z Indexed on 2013/10/24 10:12 UTC
Read the original article Hit count: 291

Filed under:
|
|

I disabled the firewall with sudo ufw disable, I can ping the server, the server can ping me but I can't ssh to it:

root@ubuntu:/home/acme# ssh 192.168.1.6 ssh: connect to host
192.168.1.6 port 22: Connection refused

I removed ssh and reinstalled :

sudo apt-get remove openssh-client openssh-server
sudo apt-get install openssh-client openssh-server

But still ssh is not working and I get the error

connection refused

How do I tackle this issue?

Here are some other stuff I have tried so far:

root@ubuntu:/home/acme# sudo service ssh start
start: Job is already running: ssh

root@ubuntu:/home/acme# ps aux | grep ssh
acme      6548  0.0  0.0  12576   320 ?        Ss   04:09   0:00 /usr/bin/ssh-agent /usr/bin/dbus-launch --exit-with-session gnome-session --session=ubuntu
root     22219  0.0  0.1  50040  2852 ?        Ss   05:10   0:00 /usr/sbin/sshd -D
root     22277  0.0  0.0   8116   896 pts/0    S+   05:17   0:00 grep --color=auto ssh

Update for future visitors

removing and reinstalling ssh on the server worked for me :

sudo apt-get remove openssh-client openssh-server
sudo apt-get install openssh-client openssh-server

© Ask Ubuntu or respective owner

Related posts about 12.04

Related posts about ssh