Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Net::SSH::Expect::Expect - Cannot interact - Followup

by Khen1950fx (Canon)
on May 01, 2008 at 10:07 UTC ( [id://683899]=note: print w/replies, xml ) Need Help??


in reply to Net::SSH::Expect::Expect - Cannot interact - Followup
in thread Module Net::SSH::Expect - Cannot interact

This worked for me:

#!/usr/bin/perl use strict; use warnings; use Net::SSH::Expect; my $ssh = Net::SSH::Expect->new( host => 'localhost', user => 'someuser', password => 'somepassword' ); warn "Starting SSH..."; $ssh->run_ssh(); warn "Testing login output..."; my $login_output = $ssh->login(); print " Done", "\n"; my $who = $ssh->exec('who'); print($who); my $exp = 'who'; $exp = $ssh->get_expect(); $exp->interact();

I guess that my system works fine without disabling the terminal. It may or may not work for you.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://683899]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (8)
As of 2024-04-18 12:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found