I'm trying to ssh into a desktop which is behind a router from a remote location. I've set the router (TP-link AC1750) to forward TCP connections to port 8000 along to port 8000 on my desktop using it's local network IP. (I'm following advice I read on a number of pages and not using the default port 22). I've included
in my desktop's sshd_config file so that it listens for requests on port 8000.
When I then try to ssh in from a remote machine with
ssh -p 8000 username@routers-public-ip-address
I get a timeout error. Running
ssh -p -v username@routers-public-ip-address
on the client side gives
debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 21: applying options for * debug1: Connecting to <ip address> [<ip address>] port 8000 debug1: connect to address 220.127.116.11 port 8000: Operation timed out ssh: connect to host 18.104.22.168 port 8000: Operation timed out
The server side logs have no indication that an attempt at a TCP connection was made.
I have no trouble ssh'ing in from a computer on the same LAN using my local IP.
I'm trying to find the logs on the router itself, as I now suspect that's where the problem is, given that the server doesn't appear to have any log of an attempted connection. Once I can find those, if it doesn't immediately solve the problem I'll update this post again.