[sf-lug] how to get a program (e.g. shell script) to log in: e.g. respond to the password prompt?

Lorin Scraba lorin at si-bemol.ro
Mon Aug 25 14:27:20 PDT 2008

On Sun, Aug 24, 2008 at 6:34 PM, jim <jim at well.com> wrote:

>   thanks, pavel. this was more what i was looking for,
> and helpful to know this kind of technique won't work
> with ssh. i was hoping for some way to detect the
> password prompt rather than just issuing sleep commands
> and hoping for the best.
>   a note to those interested in the syntax: there are
> two parts to the command, the part in parentheses
> preceding the pipe  |  character and the part following.
> the part preceding is all in parentheses, which puts
> the whole sequence of commands in a sub-shell and
> yields their output as input to the pipe to telnet.
>   i am, of course, ready to stand corrected.
> jim


sshpass would be a somewhat simpler alternative to expect/bashing. I
generally use it to carry my pub keys onto multiple servers. It's available
in debian/ubuntu repos. Not sure about the other.

An observation, probably outside the topic - when you are doing backups in
exposed/insecure environments you should a consider
pull-from-secure-backup-machine approach rather then push-to-backup. It will
keep the trust relationship between machines minimal - backup server won't
trust anyone, all will trust backup server.


PS: .ro ? -  hitting Bay Area for good in around one month and thought it
would be nice to check out the Scene ;)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://linuxmafia.com/pipermail/sf-lug/attachments/20080826/78a556bf/attachment.html>

More information about the sf-lug mailing list