Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
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 ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1021267]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2024-04-19 23:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found