Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
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 wandering the Monastery: (9)
As of 2015-07-04 10:11 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 (59 votes), past polls