The keygen program isn't a new package. It is a part of the ssh installation. Even in windows, putty for example would have a similar program installed. You can also use expect.
However, you are doing two very bad things.
1) putting the password in a script is a very bad thing to do. If the windows machine is compromised, every machine who's password you have stored is also compromised.
2) Your target linux machine allows root logins.
Even using keygen and authorized hosts isn't the best thing to do, because if your windows machine is compromised, so are the keys. It is best to set up the keys to require a passphrase and then use ssh-agent when you boot the machine. Then you enter the passphrase (from memory) once then can then run automated scripts which supply the keys needed to connect to the remote server.
Last edited by jschiwal; 06-02-2007 at 05:54 PM.
|