0

I can't access a server via ssh from a specific client.

  1. server ssh is working fine because I can access it from another clients

  2. client machine is working fine because I can access all other servers from it

  3. I try to debug using -vvv but I got no response:

josir@casa2:~/bin$ ssh -vvv [email protected]
OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n  7 Dec 2017
debug1: Reading configuration data /home/josir/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: resolving "192.168.0.20" port 22
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to 192.168.0.20 [192.168.0.20] port 22.
debug1: connect to address 192.168.0.20 port 22: Connection refused
ssh: connect to host 192.168.0.20 port 22: Connection refused

Client (192.168.0.34) and Server (192.168.0.20) are on the same network.

How can I debug to find where the problem is?

2
  • Can you ping 192.168.0.20 from the client?
    – max
    Nov 26, 2020 at 16:14
  • ping was working and I didn't reinstall openssh-client because, as I said, it was working with several other servers.
    – josircg
    Nov 26, 2020 at 17:14

2 Answers 2

2

The problem was a IP conflict! After running a network test, I found that a specific user was not using the DHCP configuration...

Should I hang him or use a guillotine?

Well, I hope this solution can help other users with the same problem:

https://www.cyberciti.biz/faq/linux-duplicate-address-detection-with-arping/

1
  • Good troubleshooting! I think you have a volunteer for the next dirty job.
    – user535733
    Nov 26, 2020 at 20:42
0

So, the server refused the connection. The answer as to why should be found somewhere on the server. Good place to start is what does /var/log/auth.log show? If not hints there, try stopping sshd on the server via systemctl and running sshd with -d from a console session for debugging.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .