Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: Expect receives no output, when requested via HTML

by Clive89 (Initiate)
on Nov 24, 2020 at 14:05 UTC ( [id://11124142]=note: print w/replies, xml ) Need Help??


in reply to Re: Expect receives no output, when requested via HTML
in thread Expect receives no output, when requested via HTML

Thanks for your reply! I think i understand the issue now. When there is no terminal, there can't be any interaction. Unfortunately i can not establish a passwordless connection (for reasons i would like to ommit). I will test as you advised. I just wonder, even if i connect with a key, will i be able to retrieve the devices response without any terminal? Is there another library for perl, that works without a terminal?

Friendly Regards,

Phil

  • Comment on Re^2: Expect receives no output, when requested via HTML

Replies are listed 'Best First'.
Re^3: Expect receives no output, when requested via HTML
by Corion (Patriarch) on Nov 24, 2020 at 14:13 UTC

    Personally, for interactive stuff, I would look at Net::SSH::Any or any of the modules that Net::SSH::Any uses. There you can conveniently send commands/input over a channel without needing Expect at all.

    Alternatively, you could look at IPC::Run for opening a child process (in your case, the ssh connection) for reading and writing, but this goes close to reimplementing Expect yourself and won't solve the password issue.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (2)
As of 2024-04-20 03:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found