SSH scripting with Net::SSH module
From: Nguyen, David M (david.m.nguyen_at_xo.com)
Date: 05/05/04
- Previous message: Darren Tucker: "Re: SSh internal window size.. (again)"
- Next in thread: Joerg Over Dexia: "Re: SSH scripting with Net::SSH module"
- Maybe reply: Joerg Over Dexia: "Re: SSH scripting with Net::SSH module"
- Reply: Wayne.Schmidt_at_MorganStanley.com: "Re: SSH scripting with Net::SSH module"
- Reply: Alexei G. Popik: "Re: SSH scripting with Net::SSH module"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Wed, 5 May 2004 16:24:29 -0400 To: <secureshell@securityfocus.com>
I currently use Net::Telnet module on CPAN to remotely reset password
for hundreds of system I support without problem. We are going to
disable telnet and replace it with secure shell so I am testing to use
Net::SSH module. The problem I have is the script just hungs when it
tries to su to root as does not recognize the next command. Does
someone ever use Net::SSH module and have any idea how to overcome this
problem?
$ssh->cmd("su"); <======= Script hungs here.
$ssh->cmd("rootpassword");
**Error shown below when running the script:
$passwdchange_ssh.pl
su: Sorry
ksh: rootpassword: not found
Thanks,
David
- Previous message: Darren Tucker: "Re: SSh internal window size.. (again)"
- Next in thread: Joerg Over Dexia: "Re: SSH scripting with Net::SSH module"
- Maybe reply: Joerg Over Dexia: "Re: SSH scripting with Net::SSH module"
- Reply: Wayne.Schmidt_at_MorganStanley.com: "Re: SSH scripting with Net::SSH module"
- Reply: Alexei G. Popik: "Re: SSH scripting with Net::SSH module"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|