Article 5P6K6 [SOLVED] SSH timesout when connecting from public IP, but locally is fine

[SOLVED] SSH timesout when connecting from public IP, but locally is fine

by
TheJooomes
from LinuxQuestions.org on (#5P6K6)
I'm trying to connect to a PC through SSH. I'm able to connecting to it locally with the local IP address, but I can't connect to it through the public IP. It just hangs for a minute or so, then times out.

Code:OpenSSH_8.4p1 Debian-5, OpenSSL 1.1.1k 25 Mar 2021
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 *
debug2: resolve_canonicalize: hostname <redacted> is address
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/home/james/.ssh/known_hosts'
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/home/james/.ssh/known_hosts2'
debug2: ssh_connect_direct
debug1: Connecting to <redacted> [<redacted>] port 22.
debug1: connect to address <redacted> port 22: Connection timed out
ssh: connect to host <redacted> port 22: Connection timed outI did port forward it. I set the port to 22, and set the IP to the local IP of the PC that I want to connect to. I set TCP/UDP like I always do. It's one of those dumb xFi routers if that matters.

I'm out of time for troubleshooting so I was hoping this place could generate some ideas in the mean time until I get back here.

SSH server is installed on the PC I want to connect to. It's running Debian 11.latest?d=yIl2AUoC8zA latest?i=cMFgSrn0mvM:mOMNkQuMFS0:F7zBnMy latest?i=cMFgSrn0mvM:mOMNkQuMFS0:V_sGLiP latest?d=qj6IDK7rITs latest?i=cMFgSrn0mvM:mOMNkQuMFS0:gIN9vFwcMFgSrn0mvM
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments