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.


Karen SchaeferBI ANALYSTAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

omgangIT ManagerCommented:
I'm not sure how Putty.exe works but here's what I use to ftp webpages from within Access

I create a batch file to call the ftp program

ftp.exe -s:c:\FOLDER\spec_FOLDER.txt

I name the file ftp_FOLDER.bat

The ftp command is calling a specification file named spec_FOLDER.txt

put c:\FOLDER\webpage_index.htm index.htm
put c:\FOLDER\991515.html
put c:\FOLDER\991515_hold.html



I have a scheduled task set to run how ever often the client wishes.  The task calls an Access application with it's Autoexce macro set to run a function that kicks everything off.

to call the batch file from the Access function

varRet = Shell(rsCom!FilePath & "\" & strBatFileName, 1)

OM Gang

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
omgangIT ManagerCommented:
Here's a link to the Putty FAQ page

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


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
Karen SchaeferBI ANALYSTAuthor Commented:
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.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.