3

Is there a way to automatic accept host keys while making a SSH connection with WinSCP. I am using winscp.com version 4.2. I understand that -hostkey=* is only available since version 5.2.

My current script just waits for the prompt and does not go forward once the host keys are changes. Is there any way to automate?

1
  • 1
    It only does this once per machine correct? It should then store the hostkey in the cache and then if it ever changes it'll ask you to accept it again. It's a security feature to prevent you from being redirected to a different machine. Commented Mar 3, 2014 at 3:37

1 Answer 1

2

The only appropriate solution for you is to upgrade. WinSCP 4.2 is years old and as such it suffers many security flaws.

And obviously, as a side effect, you get the -hostkey=* "feature".

The only way to automatically accept host key in versions prior to 5.2 is to use the -hostkey=<fingerprint>. And that's still the only CORRECT and SECURE solution.

For details, see Where do I get SSH host key fingerprint to authorize the server?

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.