The information provided here is really helpful but it does not serve my 
requirements.

I have more than 200 machines in my network running linux and I want to be 
able to ssh to each one of them using thier IP address stored in a file and 
then run some commands inside each machine, log out and log in the next 
machine in the list and do the same, so on ...

Now, using key-gen is not practical for me and I do not want to install the 
"expect" utility due to some reason.

Please tell me if there is any way to supply ssh password using bash 
scripting? I know supplying the password in script might not be very 
secure, but still I want to do it this way.

-Devendra

On Friday, 30 November 2012 12:18:52 UTC+5:30, Jai wrote:
>
>
> On Fri, Nov 30, 2012 at 12:00 PM, Devendra Gupta 
> <[email protected]<javascript:>
> > wrote:
>
>> I have a shell script in which I am doing ssh to several other machies 
>> but the problem is that the hosts require to add a key in the script 
>> invoking machine.. to resolve it I added a swith "-o 
>> StrichHostKeyChecking=no" and now its not asking to add key. But another 
>> thing I need to automate is that passing username password for remote host 
>> in the same script so that I do not need to enter it manually. Please 
>> suggest me a way, help guidance would be highly appreciated.
>>  
>>
> Hi Devendra, 
>
> You can use Expect[1] to automate this. The wikipedia page referred here 
> also contains many examples including your case.
>
> [1]: http://en.wikipedia.org/wiki/Expect
>
> -Jai
>  
>
>> -Devendra
>>  
>> -- 
>> Mailing list guidelines and other related articles: 
>> http://lug-iitd.org/Footer
>>
>
>

-- 
Mailing list guidelines and other related articles: http://lug-iitd.org/Footer

Reply via email to