SSH scripting with Net::SSH module

From: Nguyen, David M (david.m.nguyen_at_xo.com)
Date: 05/05/04

  • Next message: Julian Elischer: "Re: SSh internal window size.. (again)"
    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


  • Next message: Julian Elischer: "Re: SSh internal window size.. (again)"

    Relevant Pages