Hi Amit
You can use command 1)"ssh-keygen" to generate key 2)use command "ssh-copy-id" to copy the key (generated by ssh-keygen) to the destination m/c, Now ssh requests for password only to copy the key to dest and from now onwards it wont request you the password of the destination to login or run any command while you ssh to dest m/c HTH Kavitha On Saturday, January 19, 2013 10:00:56 PM UTC+5:30, Bondwal wrote: > > Hi All, > > I want to write a script to ssh number of servers on run some commands > and get the output in a text file. > > My limitations are given below: > > 1. I can't use public key authentication. > 2. I can't install sshpass or expect package on that server. > 3. No spawn command available. > 4. Can't install any other package on server. > 5. All servers are REDHAT 5.5 > > As per my view, only option left is that, I write a bash script who > pick up username, > ip address and password from a different file. > > I am not getting by a lot of searching, how to pick up password from a > file for ssh command. > or ssh command automatically pick up username, IP address and > password from a different file. > > My main issue is how to pickup password for ssh command from a different > file. > We can use a variable for password because password of all servers are > same. > > Any help or idea will be thankful. > > Regards > Amit Bondwal > -- -- Mailing list guidelines and other related articles: http://lug-iitd.org/Footer --- You received this message because you are subscribed to the Google Groups "Linux User Group @ IIT Delhi" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
