4
1
I use an ssh tunnel to RDP into my home computer ("home").
Occasionally, the tunneling software running on home crashes and the RDP port stops getting tunneled. I've attempted to resolve this by scheduling a script on home to run every 15 minutes that runs "netstat -tln" on my router and restarts the tunneling software if the tunneled RDP port is no longer open.
Unfortunately, occasionally the crashes are such that the RDP port remains open and accepting connections, but doesn't tunnel any traffic. E.g. the port remains open according to netstat and if I attempt to telnet into the port, it connects and shows me a blank screen. If I attempt to RDP through the tunnel, the session connects but spins on "Configuring remote session".
Bottom line: I'd like my "watchdog" script to actually attempt to connect to the RDP port to determine if the tunnel is still good. How do you probe a port to test if it's an open RDP port?
I'm thinking the ideal test is actually probing the port for RDP, but I'm also open to other ideas.
It might actually be easier to fix the root problem, namely, fix the tunneling software crash. – I say Reinstate Monica – 2015-03-25T21:42:36.547
@Twisty Thanks for the idea. I've addressed it in my answer. – Tmdean – 2015-03-26T02:31:50.473