Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Connect remote shell to local machine STDIN

by salva (Abbot)
on Nov 29, 2013 at 08:28 UTC ( #1064916=note: print w/ replies, xml ) Need Help??


in reply to Connect remote shell to local machine STDIN

Just don't pass any command to Net::OpenSSH methods and it will run the shell. You may also like to request a tty on the remote side using tty => 1.

For instance, running the shell attached to the local stdio:

$ssh->system;

Attaching it to a socket:

my $socket = $ssh->open2socket

Or to a pseudo tty:

my $pty = $ssh->open2pty

Another way to do it is to explicitly specify the shell command you want to run:

my $socket = $ssh->open2socket('/usr/sh', '-i');


Comment on Re: Connect remote shell to local machine STDIN
Select or Download Code
Re^2: Connect remote shell to local machine STDIN
by shivangi (Initiate) on Nov 29, 2013 at 09:00 UTC
    yeyyy!!!! IT WORKED .... Thanks Salva :)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2015-07-04 01:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (57 votes), past polls