Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^4: Net::OpenSSH changing directory does not work properly

by salva (Monsignor)
on Dec 07, 2011 at 12:09 UTC ( #942236=note: print w/ replies, xml ) Need Help??


in reply to Re^3: Net::OpenSSH changing directory does not work properly
in thread Net::OpenSSH changing directory does not work properly

Actually, all the methods of Net::OpenSSH support running a shell, even if it doesn't make sense for several of them.

Just, don't pass a command argument and you get a shell. For instance:

$out = $ssh->capture({stdin_data => <<EOS}); ls foo this foo that rm -R / EOS # or... ($socket, $pid) = $ssh->open2socket; print $socket "ls\n"; while (<$socket>) { print }; waitpid($pid, 0);


Comment on Re^4: Net::OpenSSH changing directory does not work properly
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (18)
As of 2014-07-31 17:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (249 votes), past polls