Link to home
Start Free TrialLog in
Avatar of Karen Schaefer
Karen SchaeferFlag for United States of America

asked on

Opening a SSH (Tunnel) Connection from Access - PUTTY.exe

I have a Access 2k3 database that uses an ODBC Connection to a MYSQL database, Thanks to some experts at experts-exchange that works great.  Unfortunately, in order to access the MySQL server I have to open a SSH connection via Putty.exe.  Due to timeout issues, just leaving the connection open is not good enough.  I am looking for a command line code or Shell command that I can use thru VBA  or bat file to open the connection, pass the user name and password.

I am trying to setup a scheduled task that will run in the middle of the night and this is my only obstacle.

Thanks,

Karen
ASKER CERTIFIED SOLUTION
Avatar of omgang
omgang
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Here's a link to the Putty FAQ page
http://www.chiark.greenend.org.uk/~sgtatham/putty/faq.html#faq-savedsettings

If it were me, I'd probably start by tying out the command line option
putty -ssh host.name

and

Secton 6.4 discusses calling a saved session
varRet = Shell(c:\path\to\putty.exe -load "mysession")

Try experimenting with a batch file that calls the exec (like above) and passing user and pass like in my sample ftp batch file.

Next, look at 4.3 re. embedding putty in another program.

OM Gang
Avatar of Karen Schaefer

ASKER

Thanks to everyones input unfortunately due to security issues at my office I will be unable to use any of theses suggestions.

Security will not allow me to  pass the private key or public key to the server.  This is final.  So I was force to give my code to the IT department to be run thru the use of PHP.

Thanks,
K