Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: SSH to remote subsystem (Net::OpenSSH?)

by sojourner9 (Initiate)
on Mar 19, 2013 at 21:23 UTC ( #1024392=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <hello xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
    ...
      <session-id>25470</session-id>
    </hello>
    ]]>]]>
    
  2. or download this
    my $ssh = Net::OpenSSH->new($host, user=>$user, password=>$pass);
    $ssh->error and die "unable to connect to remote host: " . $ssh->error
    +;
    ...
    ($socket, $pid) = $ssh->open2socket;
    while (<$socket>) { print };
    waitpid($pid, 0);
    
  3. or download this
    # call args: ['ssh','-o','ServerAliveInterval=30','-x2MN','-o','Number
    +OfPasswordPrompts=1','-o','PreferredAuthentications=keyboard-interact
    +ive,password','-S','/home/user/.libnet-openssh-perl/user-host-31054-2
    +7407','-l','user','host','--']
    
  4. or download this
    # call args: ['ssh','-s','-S','/home/user/.libnet-openssh-perl/user-ho
    +st-31054-27407','-l','user','host','--','xmlagent']
    # open_ex: ['ssh','-s','-S','/home/user/.libnet-openssh-perl/user-host
    +-31054-27407','-l','user','host','--','xmlagent']
    ...
    # open_ex: ['ssh','-S','/home/user/.libnet-openssh-perl/user-host-3105
    +4-27407','-l','user','host','--']
    Pseudo-terminal will not be allocated because stdin is not a terminal.
    stty: standard input: Invalid argument
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1024392]
help
Chatterbox?
NodeReaper puts the hammer down

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2017-11-19 13:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (281 votes). Check out past polls.

    Notices?