Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^2: Sending and receiving data to standard input and output of the linux based server.

by regexes (Hermit)
on Mar 01, 2013 at 14:11 UTC ( #1021267=note: print w/ replies, xml ) Need Help??


in reply to Re: Sending and receiving data to standard input and output of the linux based server.
in thread Sending and receiving data to standard input and output of the linux based server.

Basically, you need to know when the telnet/SSH session is prompting for input.
How to get around that problem?

Net::Telnet
Make the prompt something you know, see here: Re: Net::Telent - How to get the prompt displayed after login using telnet?
Then send the input, see here: Interactive input via telnet

With Net::Telnet, it's all a matter of using cmd(), waitfor() and print()

For SSH, you might try taking a look at Net::SSH::Expect
I haven't searched here but I bet there's plenty of examples to be found.


Comment on Re^2: Sending and receiving data to standard input and output of the linux based server.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (11)
As of 2014-09-01 14:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (13 votes), past polls