0

I have two PCs running Linux Mint 20.10. One is my daily workstation and the other is used as a server for Home Assistant. I have installed both the openssh client and server on both PCs and confirmed they are enabled and started. I've checked and the Linux firewalls are not blocking port 22 and my router is allowing connections to 22 on my LAN. When I try to connect from my workstation to the Home Assistant (HA) server with any ssh client, the connection always times out without any connection being made. I am able to ssh from the server to my workstation without any problem.

I have tried using the verbose mode of ssh as well as looking at the auth_logs to see if they might give me a clue on the problem. Neither shows anything about the connection once the "connecting 192.168.1.193" is issued. I can ping the HA server from my workstation without issue. However when I do a traceroute I get nothing but asterisks. Interestingly my Home Assistant instance is running inside VirtualBox bridged to the servers ethernet connection and has it's own IP. When I traceroute to the HA IP address I get the route info, no asterisks.

RESULT OF SSH TO SERVER

resto@AMD9-3900-Mint:/etc/ssh$ ssh -v 192.168.1.193
OpenSSH_8.2p1 Ubuntu-4ubuntu0.1, OpenSSL 1.1.1f 31 Mar 2020
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug1: Connecting to 192.168.1.193 [192.168.1.193] port 22.
debug1: connect to address 192.168.1.193 port 22: Connection timed out
ssh: connect to host 192.168.1.193 port 22: Connection timed out resto@AMD9-3900-Mint:/etc/ssh$

TRACEROUTE TO THE HOME ASSISTANT INSTANCE ON SERVER

resto@AMD9-3900-Mint:/etc/ssh$ sudo traceroute 192.168.1.194
traceroute to 192.168.1.194 (192.168.1.194), 30 hops max, 60 byte packets
1 192.168.1.194 (192.168.1.194) 0.618 ms 0.582 ms 0.569 ms

TRACEROUTE TO THE SERVER HOSTING MY HOME ASSISTANT INSTANCE

resto@AMD9-3900-Mint:/etc/ssh$ sudo traceroute 192.168.1.193
traceroute to 192.168.1.193 (192.168.1.193), 30 hops max, 60 byte packets
 1 * * * 
 2 * * * 
 3 * * *
 4 * * *
 5 * * *
 6 * * *
 7 * * *
 8 * * *
 9 * * *
10 * * *
11 * *^C
resto@AMD9-3900-Mint:/etc/ssh$

I have Googled descriptions of my problem and have learned a lot but not the answer. Hoping someone here might know what's happening and how I can fix it.

Thanks, Jeff

1
  • Connection timed out might indicate an enabled firewall, ufw in Ubuntu. Commented Nov 26, 2020 at 12:01

1 Answer 1

1

Please try opening a port in the firewall as Artem has suggested:

sudo ufw allow ssh

on the target host (the one with the ssh server).

4
  • This line did it. I don't understand though... I went to the firewall gui and setup a rule to allow all traffic on port 22 within my LAN, yet that didn't do the trick. Is there a difference between ufw and the Firewall app that comes preinstalled with Mint?
    – Jeff
    Commented Nov 26, 2020 at 12:25
  • One other thing, while this command allows ssh to work, I still get asterisks when I traceroute the server. Any idea why?
    – Jeff
    Commented Nov 26, 2020 at 12:28
  • @Jeff That is normal, traceroute uses a different type of connection for its test, usually udp ports 33434 to 33534 or some icmp packages - which may be blocked inbound on the server (and/or outbound on the client). Feel free to ask a new question about that. Since ssh works for you now please accept an upvote the answer so that others who have the same problem can see that this is a solution.
    – Ned64
    Commented Nov 26, 2020 at 12:34
  • traceroute blocked on Ubuntu: serverfault.com/questions/550586/…
    – Ned64
    Commented Nov 26, 2020 at 12:42

You must log in to answer this question.

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