Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Multi-hops with Net::OpenSSH

by jpavel (Sexton)
on May 29, 2009 at 19:27 UTC ( #766932=note: print w/replies, xml ) Need Help??


in reply to Multi-hops with Net::OpenSSH

If I recall correctly, that's a feature of sshd. You can override it by issuing '-t' in your ssh command. e.g., "ssh -t <user>@<host".

Replies are listed 'Best First'.
Re^2: Multi-hops with Net::OpenSSH
by salva (Abbot) on May 29, 2009 at 20:07 UTC
    Most Net::OpenSSH commands accept an tty => 1 option exactly just for doing that.

    For instance:

    $ssh->system({tty => 1}, ssh => $hostB, $commandB);
      Hi salva,

      Do I include this this on ScriptA or ScriptB?

      ScriptA ssh's to $host1 and executes ScriptB which ssh's to $host2.

      I tried adding it to ScriptB but get the following error from Net::OpenSSH::new() (which is where my error is coming from)
      Invalid or bad combination of option ('tty')

      Thanks!
        Do I include this this on ScriptA or ScriptB?

        I can't tell you without seeing the scripts source code! post them.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://766932]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2018-06-19 01:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?



    Results (111 votes). Check out past polls.

    Notices?