I'm trying to write a script that uses an SSH tunnel to a database in order to access it. I'm not able to get it to work. Anyone else tried this before?
I've already setup my ssh key and I can run the open database and have it return if I run the ssh command in a cmd window separate from the script but I'd like it if I can integrate everything into the JSL (so users don't have to remember to open the tunnel).
Names default to here(1);
rp = Run Program(
executable("ssh.exe"),
Options({"-tt", "-L 1414:localhost:1414", "test@test.com"}),
ReadFunction( "text" )
);
dt = open database(
"cxn_string",
"SELECT * FROM Test",
"Test"
);
rp << Write EOF();
Thanks in advance.