0

Hello I have set up an ssh tunnel as follows: 

 /usr/bin/ssh -vvv -o ServerAliveInterval=10 -o ServerAliveCountMax=3 -R 15000:127.0.0.1: 15000 -N mylinode.domain.com
...
debug1: Offering public key: /Users/rcook/.ssh/id_rsa RSA SHA256:8Y33c0fxIoqd3SmemVpq5jOPdaqPQ/DnadmlP6A4q14
debug1: Server accepts key: /Users/rcook/.ssh/id_rsa RSA SHA256:8Y33c0fxIoqd3SmemVpq5jOPdaqPQ/DnadmlP6A4q14
Authenticated to mylinode.domain.com ([45.79.100.248]:22) using "publickey".
debug1: Remote connections from LOCALHOST:15000 forwarded to local address localhost:15000
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug1: pledge: filesystem
debug1: client_input_global_request: rtype hostkeys-00@openssh.com want_reply 0
debug1: client_input_hostkeys: searching /Users/rcook/.ssh/known_hosts for mylinode.domain.com / (none)
debug1: client_input_hostkeys: searching /Users/rcook/.ssh/known_hosts2 for mylinode.domain.com / (none)
debug1: client_input_hostkeys: hostkeys file /Users/rcook/.ssh/known_hosts2 does not exist
debug1: client_input_hostkeys: host key found matching a different name/address, skipping UserKnownHostsFile update
debug1: pledge: network
debug1: Remote: /home/rcook/.ssh/authorized_keys:2: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding
debug1: Remote: /home/rcook/.ssh/authorized_keys:2: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding
debug1: Remote: Forwarding listen address "localhost" overridden by server GatewayPorts
debug1: remote forward success for: listen 15000, connect localhost:15000

In my firewall, I have opened port 22000 for TCP and UDP for this host.  On mylinode, I can connect locally to the tunnel, with telnet localhost 22000 However, I cannot connect from another machine using the equivalent command. It gives the error: "Connection refused" immediately. 

rcook@MacBook-Pro-2021 (obsidian-media-db-plugin (master)): nc -zv mylinode.domain.com 22000
nc: connectx to mylinode.domain.com port 22000 (tcp) failed: Connection refused

What might cause this? Here are some settings of note from /etc/sshd/sshd_config:

#AllowAgentForwarding yes
AllowTcpForwarding yes
GatewayPorts yes
X11Forwarding yes
Rich
  • 183

1 Answers1

0

OK, this has somehow resolved itself. I'm able to connect to the tunnel even from outside hosts. I have not made any changes; maybe somehow the connection port got locked up somehow during testing? At any rate, things are working again. I'm sorry I don't have a clear answer to what caused this.

Rich
  • 183