Expect is what you want-- ssh won't take input from redirected stdin.<br> <br>Here's some things that won't work-<br><br>$echo 'password' |ssh username@hostname<br><br>Variations on a script-<br>#!/bin/bash<br>
ssh username@host << EOF<br>password<br>EOF<br><br>While expect will do this, a cleaner and more secure way to set this up is with shared key authentication.<br><br>--Dennis<br><br><br><br><br><br><div class="gmail_quote">
On Mon, Oct 10, 2011 at 4:29 PM, chip <span dir="ltr"><<a href="mailto:chip.gwyn@gmail.com">chip.gwyn@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Possibly 'yes' ?<br>
<br>
-> which yes<br>
/usr/bin/yes<br>
<br>
NAME<br>
yes - output a string repeatedly until killed<br>
<br>
SYNOPSIS<br>
yes [STRING]...<br>
yes OPTION<br>
<br>
DESCRIPTION<br>
Repeatedly output a line with all specified STRING(s), or ‘y’<br>
<div><div></div><div class="h5"><br>
On Mon, Oct 10, 2011 at 4:09 PM, Jim Kinney <<a href="mailto:jim.kinney@gmail.com">jim.kinney@gmail.com</a>> wrote:<br>
> Looking for a command name. Google is not my friend<br>
><br>
> Usage: <command> 'string'<br>
> It echos string to any avail stdin. Really useful to toss a password into<br>
> for a long series of logins.<br>
> Scanning /usr/bin not helping.<br>
><br>
> For I on $(seq 1 254) do<br>
> <command> 'mypass' ssh me@host rpm -qa|grep foo<br>
> Done<br>
><br>
</div></div><div class="im">> _______________________________________________<br>
> Ale mailing list<br>
> <a href="mailto:Ale@ale.org">Ale@ale.org</a><br>
> <a href="http://mail.ale.org/mailman/listinfo/ale" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a><br>
> See JOBS, ANNOUNCE and SCHOOLS lists at<br>
> <a href="http://mail.ale.org/mailman/listinfo" target="_blank">http://mail.ale.org/mailman/listinfo</a><br>
><br>
><br>
<br>
<br>
<br>
</div><font color="#888888">--<br>
Just my $.02, your mileage may vary, batteries not included, etc....<br>
</font><div><div></div><div class="h5"><br>
_______________________________________________<br>
Ale mailing list<br>
<a href="mailto:Ale@ale.org">Ale@ale.org</a><br>
<a href="http://mail.ale.org/mailman/listinfo/ale" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a><br>
See JOBS, ANNOUNCE and SCHOOLS lists at<br>
<a href="http://mail.ale.org/mailman/listinfo" target="_blank">http://mail.ale.org/mailman/listinfo</a><br>
</div></div></blockquote></div><br>