Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Net::ssh:expect and DBI

Status
Not open for further replies.

pimp1911

MIS
Aug 20, 2007
4
Im a newbie to perl so please forgive. My question. Can Net::ssh:expect be used to read from a local database(using DBI)for password and userid information. For exmaple Mysql. I am trying to set something up where the userid and password are taken from a local mysql database based on if they are active(ie flag) customer. If so. Read from the local database that contains login infromation and then establish a remote connection to another server based off of that information.
 
I'm not sure why you would use Net::ssh::expect to talk to a DB. Why not use DBI?

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[noevil]
Travis - Those Who Say It Cannot Be Done Are Usually Interrupted by Someone Else Doing It; Give the wrong symptoms, get the wrong solutions;
 
I am using DBI to read from a local database. That database contains userid and password information and remote access information to another server. I need to figure out how to take that information out of my local database and use it to connect to another server via net:ssh:expect.
 
Ok. What code do you have so far?

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[noevil]
Travis - Those Who Say It Cannot Be Done Are Usually Interrupted by Someone Else Doing It; Give the wrong symptoms, get the wrong solutions;
 
DBI installed for me but DBD::Mysql never did..urgh. I found a command line way to interact with the DB, which I can pull the login authenticaiton from and pass it to Net::SSH::Expect.

I'm sure you can use both with each other wihout any problems.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top