Friday, April 19, 2024
 Popular · Latest · Hot · Upcoming
4
rated 0 times [  4] [ 0]  / answers: 1 / hits: 64835  / 3 Years ago, mon, june 7, 2021, 9:41:05

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

More From » 12.04

 Answers
1

Removing and reinstalling ssh on the server worked for me :



My master node is : 192.168.1.6



My client is: 192.168.1.4



On the master I did this:



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


Now from my client I did this:



root@ubuntu:/home# ssh 192.168.1.6
[email protected]'s password:
Welcome to Ubuntu 12.04.3 LTS (GNU/Linux 3.8.0-29-generic i686)

* Documentation: https://help.ubuntu.com/

131 packages can be updated.
67 updates are security updates.

Last login: Thu Oct 24 15:18:34 2013 from ubuntu.local

[#28776] Wednesday, June 9, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
damomnning

Total Points: 422
Total Questions: 90
Total Answers: 106

Location: Mali
Member since Thu, Aug 13, 2020
4 Years ago
;