Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Expect and CSSH

by salva (Canon)
on Feb 15, 2012 at 08:36 UTC ( [id://953868]=note: print w/replies, xml ) Need Help??


in reply to Expect and CSSH

Is using CSSH a requeriment?

I ask because you are trying to automate an application that was never intended to be automated and it may be easy to use other approaches.

For instance, if you want to run commands in several hosts in parallel through ssh, Net::OpenSSH::Parallel may be a better option.

If you want to display the output in several terminals as cssh does, then you can use GTK+ and the excellent VTE terminal emulation widget (Gnome2::Vte). AFAIK, no similar widget exist for Tk.

You may also like to investigate urxvt, a terminal emulator with an embedded perl interpreter.

Replies are listed 'Best First'.
Re^2: Expect and CSSH
by Monkless (Acolyte) on Feb 16, 2012 at 07:16 UTC

    @Slava: Thanks Much! Not a requirement, but we have re-written CSSH to our needs and was implementing a control panel of sorts to combine the two into one nice massive tool that works for our needs. I appreciate the tips and will review the alternatives, though this issue I have ran into is not a showstopper for my project, I was just curious if a Monk or the alike have ran into an similar situation and knew a neat workaround/trick. I have emailed the developer of CSSH to get his insight as well. . . Greatly Appreciate all the response on this issue!

      UPDATE: Issue-Resolved.

      Just wanted to post an update as this may help someone down the road. My issue was that CSSH is using a <<paste>> event to send text to all servers - The paste event is using Selectget, which pulls from either the Primary X buffer or Clipboard, depending on which select=> is defined. So you must either select something or store it in either buffer for it to be sent. I created a few variables with the text needed, then used perls readline to prompt for password once, this is then stored and passed to all the servers on a sleep timer (to ensure the password prompt is hit) Thanks all for taking the time to review this issue..

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2024-03-28 23:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found