cstrong has asked for the wisdom of the Perl Monks concerning the following question:
I have tried sending the command prior to "$ssh->shell" and also requesting a pty session during login, but nothing really works. Do any of you monks have an idea how this can be done?#!/usr/bin/perl use Net::SSH::Perl; use Term::ReadKey; $ip=$ARGV[0]; $user = "username"; $pass = "password"; print "connecting to $ip\n"; my $ssh = Net::SSH::Perl->new("$ip", debug=>"1"); $ssh->login ($user, $pass); ReadMode('raw'); $ssh->shell; ReadMode('restore');
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Interactive SSH and sudo -s
by ELISHEVA (Prior) on Feb 24, 2009 at 14:34 UTC | |
by cstrong (Beadle) on Feb 24, 2009 at 15:04 UTC | |
by ELISHEVA (Prior) on Feb 24, 2009 at 15:25 UTC | |
|
Re: Interactive SSH and sudo -s
by salva (Canon) on Feb 24, 2009 at 15:33 UTC | |
|
Re: Interactive SSH and sudo -s
by hbm (Hermit) on Feb 24, 2009 at 14:36 UTC | |
by cstrong (Beadle) on Feb 24, 2009 at 15:07 UTC |