How to launch the rdp file after the opening of the tunnel?

Kitty, configured tunnel, there is a rdp file
you need to run after the lifting of the tunnel.
July 8th 19 at 16:01
2 answers
July 8th 19 at 16:03
Kitty does not know how to open external applications when the connection, it can not confirm the existence of the tunnel, filing out some kind of signal.

I would have made the script using plink. Will run quietly work in the background.
If it returns 0, then start the RDP connection.
Really need to figure out how to beat plink.exe process. Maybe it would be better to always leave it in the background.

According to this principle a few well-known programs for Windows (e.g. HeidiSQL).

Be careful: when you first connect, plink asks for interactive confirmation key fingerprint (y/n). It is theoretically possible to hide via -batch.
I expected something more straightforward, like a batch file to establish a connection, check the local port to run the RDP file. but not strong in cmd and want to use only the standard (included sevens) software. - Rusty.Ebe commented on July 8th 19 at 16:06
: A set of seven software for SSH, unfortunately, no, so that in any case some 3rd party tools.
And in the script, the idea is that there will be nothing but if then and the calling program.

All this, of course, can be avoided by installing the server with a permanent VPN. - Carli commented on July 8th 19 at 16:09
: Maybe it's not right.... kit + kitty + ssh keys + 1.rdp. - Rusty.Ebe commented on July 8th 19 at 16:12
: plink is a utility from the maker of putty (because his kitty fork)
To use it, not necessarily just subjective observations for scripting tunnels it is used more often than hainesyoung full putty/kitty. - Carli commented on July 8th 19 at 16:15
July 8th 19 at 16:05
if the test port for openness = ok goto rdp
else goto test
then launch rdp

:test is currently executing ping in 5 seconds

Find more questions by tags WindowsRDPSSH