Is there any way to automatically accept SSH host keys—even when keys are changed—in PuTTY?

Spock

We use some software that will SSH to a bunch of machines and do something. The problem is in our test lab, the virtual machine’s are re-new (destroy and re-created) very often, so the software will treat the virtual machine as new, which it is, and will fail because the authenticity of the host cannot be established. I was told to manually PuTTY in and accept the host key, and after the software will be happy.

Doing this with a few hundreds virtual machines is not fun.

So, I want to know is there any a command tool that I can automate to accept the host key for PuTTY? We are in a closed lab, so I am not too worried about security.

I know there are some solutions for Linux environment, but this one is Windows.

Spock

@Paul above suggested to use pscp. It works great, is super simple, and totally scriptable:

 C:\> echo y | pscp.exe -l user -pw password -ls 192.168.0.1:/

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

ssh: automatically accept keys

How to accept SSH Host keys programmatically if fingerprint is known?

Is there a way to have ssh offer more keys to login automatically?

Is there any way to access the coding keys for an automatically generated Codable conformance?

Setup SSH keys created by PuTTY in GitLab

Existing host keys found error when ssh in gcp vm instance

Unable to point to ssh keys in ~/.ssh on Jenkins host

Why does SSH hosts keys differ when connecting if the host_keys are the same?

Error `could not load host key` when trying to recreate SSH host keys

Android: Is there any way to identify when the keys are pressed/unpressed on an edittext softkeyboard?

When are host keys for the server generated

SSH config - same host but different keys and usernames

Multiple SSH Keys for same user on same host

How to roll over ssh host keys?

Is it possible to use CA signed keys to ssh from windows to linux with putty?

Does ssh-keygen -y work with PuTTY generated keys?

Paramiko cannot open an ssh connection even with load_system_host_keys + WarningPolicy

Putty + Vim + Alt Keys

Is there a way to remove all the ssh keys added to ssh-agent when the user locks the system?

Automatically launching PuTTY with vagrant ssh

Automatically open Putty and SSH into server

"Remote host identification has changed" warning when connecting over SSH

The safest way to backup GPG and SSH keys

Is there any way of getting values from keys inside other keys?

Fastest way to clone a table minus any keys

Any way to use 'defined' operator on object keys?

Any Way to Pass Media Keys Through VirtualBox

Is there any way to view the currently mapped keys in Vim?

is there any way to swap the function of two keys on keyboard?