#Golang Connect to SSH Server & Accept Host automatically
6 messages · Page 1 of 1 (latest)
so you know this is a bad idea, man in the middle etc etc right ?
so figuring out a prompt to give the user is a much much better solution
but if you simply cannot, I can find this one solution but it involves a key https://skarlso.github.io/2019/02/17/go-ssh-with-host-key-verification/
Go SSH with Host Key Verification
keys are generally better practice if you can use them, harder to break than easy to remember passwords
if you have access to the command line there are various ways to add the new known host