Command Line to accept any hostkey

Advertisement

Xijamk
Guest

Command Line to accept any hostkey

Hi, is there a way to accept any hostkey in command line? Because I'm trying to run this script but i'm always receiving the same message :
If you trust this host, press Yes. To connect without adding host key to the cache, press No. To abandon the connection press Cancel.
(Y)es, (N)o, C(a)ncel, (C)opy Key: Cancel
I always want to select "Y". This is because the hostkey are always changing.

Yes, I have checked https://winscp.net/eng/docs/faq_scheduler and hostkey documentation but I can't found what I need.

Thanks!

Reply with quote

Advertisement

Advertisement

Mart
Guest

Re: Command Line to accept any hostkey

Care about security or not. It just won't work otherwise so security be damned. That's because there is a bug in centos which changes host key every so often. And Centos.org won't admit it, every idiot on net just blabes about how there is some fake server in my network - there is not, host key changes even on direct connection between two computers in the middle of transmission.

Reply with quote

martin
Site Admin
martin avatar

Re: Command Line to accept any hostkey

@Mart: the hostkey is checked only at the beginning of the connection. Even if it does change in the middle of the connection (imo impossible for common OpenSSH server), you wouldn't notice the change. Something does not match in your post. Also, isn't your server load balanced? If it is, you can list hostkeys of all server instances in the -hostkey switch. If you need out help, please post logs.

Reply with quote

Advertisement

You can post new topics in this forum