how to connect DB from batch script?

  1. run few scripts from windows to access unix environment.

scripts will have

  1. login to putty
  2. connect to server with another set of credentials ( Here, user input is required for password as pass word generated randomly by RSA token)
  3. connect server2 with another set of credentials
  4. connect DB.

Step1 done as like below

SET /p userin=Please enter your full name:
SET /p pasw=Please enter your password:

cd "C:\Documents and Settings\All Users\Desktop"
start putty.exe -ssh %username%@192.168.210.246 -pw %pasw%

how to connect next set of servers.. can u pls give me an idea through scripts

putty is a graphical program and not meant to be run noninteractively.

The same people who made putty made plink, a batch-based equivalent to putty which is.