- I have a raspberry at home with SSH server, RSA keys configured and port 22 open on the router.
- I have another Raspberry Pi (client), with which I can connect to my house ONLY by LAN (with ssh from terminal and with putty from desktop).
- Instead, I can connect to it with Putty (on Windows) and with Termux (on Android), from LAN and from INTERNET (without port forwarding problems).
- I am unable to connect SSH from the Raspberry Pi client to the Raspberry Pi server over the INTERNET, both with domain and public IP.
- I have tried
ssh -v -v -v email@example.com -p 22and
ssh -v -v -v pi@public-ip -p 22with result:
pi@raspi2:~ $ ssh -v -v -v firstname.lastname@example.org OpenSSH_7.9p1 Raspbian-10+deb10u2, OpenSSL 1.1.1d 10 Sep 2019 debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 19: Applying options for * debug2: resolve_canonicalize: hostname public.ip is address debug2: ssh_connect_direct debug1: Connecting to public.ip [public.ip] port 22. debug1: connect to address public.ip port 22: Connection timed out ssh: connect to host public.ip port 22: Connection timed out pi@raspi2:~ $
NOTE: /etc/ssh/ssh_config line 19 contains:
What I can do?