On Wednesday, June 20, 2012 1:12:55 AM UTC-6, Saurabh wrote:
> My first question is do we get any popup if trying to run the script on linux box? If yes how can a tcl script handle that?
This will depend on what is actually running when you call shh; if you're running openssh, then you can add -oStrictHostKeyChecking=no to the command call or add it to your ssh_config file. This will automatically accept add new keys to the known_host file.
http://www.openbsd.org/cgi-bin/man.cgi?query=ssh_config&sektion=5
> When running the same script on windows we get a popup. How can we handle that popup from the script itself?
Again, this will depend on ssh, but the easiest way would be to mimic the above with the equivalent settings for the windows ssh client.
You could also look in to using twapi to deal with the popup if there's no way to disable it. I haven't used twapi to do this myself...
http://twapi.magicsplat.com
You probably already know this, but for the benefit of anyone who may not... It's generally a bad idea to blindly accept a hosts key, unless the remote server is under your control.