On Mon, Feb 25, 2002 at 01:10:52PM -0500, Bill Mills-Curran wrote:
I have a situation where I'd like to run ssh from a script to connect to a different machine. In some cases, the machine's IP will have changed, due to DHCP. Is there a way I can either:
1. make ssh accept the new site without supplying the "yes" from the keyboard.
Assuming you have passphraseless RSA/DSA keys setup, you can avoid the "are you sure you want to ..." question via the following commandline option: -o 'StrictHostKeyChecking=no' That tells SSH to not ask about adding hosts to the known_hosts file. I have a script which will take in a list of hosts via STDIN and SSH to each one running a certain command, so in the code I have the following that works nicely: $command = "ssh -f -n -q -c blowfish -x -o \'StrictHostKeyChecking=no\'"; $params = "$machine $remoteuser \'@ARGV\' 2>&1"; -- Randomly Generated Tagline: "if you don't know what Unix is, get off the internet." - Catherine Skidmore