I am trying to setup an ssh server, and I can ssh locally with pubkey authentication, but when I try using the server's public ip, I cannot. I checked this website to see if the port was really open or not, and it was. I checked if there was a firewall and there doesn't seem to be any.
[jacob@cooler ~]$ ssh -vvv -p 22 user@ip) OpenSSH_7.9p1, OpenSSL 1.1.1b 26 Feb 2019 debug1: Reading configuration data /etc/ssh/ssh_config debug2: resolve_canonicalize: hostname (ip) is address debug2: ssh_connect_direct debug1: Connecting to (ip) [(ip)] port 22. debug1: connect to address (ip) port 22: Connection timed out ssh: connect to host (ip) port 22: Connection timed out [jacob@cooler ~]$ ^C When I use the lan ip(using the same machine as the same client), it works. Changing the ip to the public ip does not. Any advice is welcome!