Strange problem with SSH Client inside the Home Assistant OS

Hi all,

I have been fiddling with settings and conf.files for hours now. I give up :slight_smile:
I installed SSH (server) on Home Assistant OS and it works fine.
When I am logged on, I can SSH to my NAS, my backupNAS but not my router.

[core-ssh ssh]$ ssh -p 22 [email protected]
ssh: connect to host 192.168.1.1 port 22: Operation timed out
[core-ssh ssh]$

When I reboot my router, and non stop retry the same line over and over again " ssh -p 22 [email protected]", I can log on!
But after <60 seconds, I cannot.

The gut feeling would be that the router has a problem, but from my windows computer I can logon with ssh (.exe) and Putty, without a problem. Over and over again… Never a problem.

It is like my router bans my home assistant after startup somehow? Or the other way around.

I tried changing IP
I tried a manual IP + I checked that no other device has the same IP
I reinstalled Home Assistant completely
I double checked that there is nothing that bans ip addresses active on my router (Asus RT-AC86, Merlin)
I upgraded my router to the latest firmware
I tried fiddling with the ssh_config-file
I succesfully generated new SSH-keys and even copied/installed them on the router with ssh-copy-id (with being fast after a fresh reboot of the router)
I started SSH with -vv

So, I can logon easily with
ssh -i /path to keyfile -p 22 [email protected] JUST after a reboot of the router. But then afterwards, nothing…

OpenSSH_8.6p1, OpenSSL 1.1.1l 24 Aug 2021
debug1: Reading configuration data /etc/ssh/ssh_config
debug2: resolve_canonicalize: hostname 192.168.1.1 is address
debug1: Authenticator provider $SSH_SK_PROVIDER did not resolve; disabling
debug1: Connecting to 192.168.1.1 [192.168.1.1] port 22.
debug1: connect to address 192.168.1.1 port 22: Operation timed out
ssh: connect to host 192.168.1.1 port 22: Operation timed out

I am out of ideas. The annoying thing is that I cannot google for “SSH problem home assistant” because 99% has to do with people that cannot SSH into the home assistant and that is not my problem.

Any tips? Ideas? Things left to try?

Kind regards,
Demesmaeker

Update:
I cannot “see” port 22 at all. So it is not just the SSH client that has problems.

[core-ssh .ssh]$ nc -zvw10 192.168.1.1 22
nc: 192.168.1.1 (192.168.1.1:22): Operation timed out

I can ping and I can see all other open ports on the router, just not 22.
I tried changing it to another port, no difference! :open_mouth: