0

I've looked through a million threads on this topic but nothing has worked. I'm trying to ssh into my linux through port 22. Connection is refused.

  1. UFW is inactive and firewall-cmd is not downloaded
  2. SSH Server is active and up to date
  3. Tried changing default port in /etc/ssh/sshd_config and restart systemctl and specifying new port in ssh attempt
  4. Purged and reinstalled openssh-client openssh-server
  5. I can ssh back and forth between two mac machines on the same wifi network
  6. ssh was working at one point with same client and same IP address and stopped seemingly at random and has not worked since.
  7. Verified that client is trying to connect to the current IP address. Again- ssh between other machines on this network works. It is just an issue with the linux machine receiving an ssh request
  8. Ping [ip address] output from the computer I am trying to remote into outputs a response, but pinging from the client displays request time out
  9. This is a company wide network so I do not have access to the routers. But again, I have ruled out an upstream network issues because of points 5 and 7 above
  10. I can access the host remotely with no issues using propriety software (AnyDesk)
  11. The server (Ubuntu 20.04) seems to only be blocking Mac OS from ssh. SSH from Windows 11 running on same network works fine. Tried on 3 different Mac OS machines all running different versions of Mac OS on the same network as the server and ssh timed out on each one.

Requested output of -vvv user_id@ip_address:

    OpenSSH_9.0p1, LibreSSL 3.3.6
    debug1: Reading configuration data /etc/ssh/ssh_config
    debug1: /etc/ssh/ssh_config line 21: include /etc/ssh/ssh_config.d/* matched no files
    debug1: /etc/ssh/ssh_config line 54: Applying options for *
    debug2: resolve_canonicalize: hostname 172.xx.xxx.16 is address
    debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/Users/samcentanni/.ssh/known_hosts'
    debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/Users/samcentanni/.ssh/known_hosts2'
    debug1: Authenticator provider $SSH_SK_PROVIDER did not resolve; disabling
    debug3: ssh_connect_direct: entering
    debug1: Connecting to 172.xx.xxx.16 [172.xx.xxx.16] port 22.
    debug3: set_sock_tos: set socket 3 IP_TOS 0x48
    debug1: connect to address 172.xx.xxx.16 port 22: Operation timed out
    ssh: connect to host 172.xx.xxx.16 port 22: Operation timed out

requested output of service sshd status

    ssh.service - OpenBSD Secure Shell server
         Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: e>
         Active: active (running) since Tue 2023-10-03 09:42:22 EDT; 24h ago
           Docs: man:sshd(8)
                 man:sshd_config(5)
        Process: 2475 ExecStartPre=/usr/sbin/sshd -t (code=exited, status=0/SUCCESS)
       Main PID: 2535 (sshd)
          Tasks: 1 (limit: 629145)
         Memory: 2.4M
         CGroup: /system.slice/ssh.service
                 └─2535 sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups
Oct 03 09:42:22 user systemd[1]: Starting OpenBSD Secure Shell server...
Oct 03 09:42:22 user sshd[2535]: Server listening on 0.0.0.0 port 22.
Oct 03 09:42:22 user sshd[2535]: Server listening on :: port 22.
Oct 03 09:42:22 user systemd[1]: Started OpenBSD Secure Shell server.
Oct 03 09:42:22 user sshd[2788]: Unable to negotiate with 127.0.0.1 port 56816: no matching host key type found. Their offer: ssh-dss [preauth]
Oct 03 09:42:22 user sshd[2789]: Connection closed by 127.0.0.1 port 56824 [preauth]
Oct 03 09:42:22 user sshd[2790]: Connection closed by 127.0.0.1 port 56834 [preauth]
Oct 03 09:42:22 user sshd[2792]: Connection closed by 127.0.0.1 port 56836 [preauth]
Oct 03 09:42:22 user sshd[2794]: Unable to negotiate with 127.0.0.1 port 56842: no matching host key type found. Their offer: sk-ecdsa-sha2-nistp256@openssh.com [preauth]
Oct 03 09:42:22 user sshd[2795]: Unable to negotiate with 127.0.0.1 port 56844: no matching host key type found. Their offer: sk-ssh-ed25519@openssh.com [preauth]
  • I don't see "Verified that the client is trying to connect to the server's current IP address" on the list of actions already taken. Amazing how often a changed IP address is the culprit. – user535733 Oct 04 '23 at 00:12
  • have you opened the port on your router? – rocky danger Oct 04 '23 at 00:32
  • added to the main question – SC542164 Oct 04 '23 at 17:09
  • hi @sc542164 from the error: no matching host key type found. Their offer: ssh-dss [preauth], I think one of these answers might help you: https://askubuntu.com/a/1368561/928088 | https://askubuntu.com/a/836064/928088. Thanks. – Jags Oct 04 '23 at 17:38
  • Unfortunately none of these suggestions worked. But I've since discovered that I can ssh from a windows 11 OS without any issues, but i've tried to ssh on 3 different mac OS machines and it is blocked on all. I have no idea what the difference could be. they are all running different I.p. addresses on the same network. reminder- server IP address has not changed. the computers I am referring to are all clients on the same network trying to ssh into the ubuntu. AND each mac is running a different OS (Ventura, Catalina, Monterey) – SC542164 Oct 05 '23 at 20:44

0 Answers0