wallix / awless

A Mighty CLI for AWS
http://awless.io/
Apache License 2.0
4.98k stars 263 forks source link

more thoroughly skip host key checks #117

Closed justone closed 1 year ago

justone commented 7 years ago

Without this change, when the host key changes, you still get a big scary warning, even though the ssh connection succeeds. This just /dev/nulls the known hosts file so that nothing is shown.

Also, it adds a short option (-d) for skipping the host key check.

simcap commented 7 years ago

Two quick comments:

More generally, I am wondering if doing that we could hide and change the behavior of the SSH doing the connection. Because with the flag -d we just say that we disable the strict host key check (-o StrictHostKeyChecking) as per SSH spec, and nothing would indicate here that we redirect the warning to '/dev/null', which is done with -o GlobalKnownHostsFile and -o UserKnownHostsFile.

Therefore shouldn't we add another new flag (with a short version) like --ignore-warning or --ignore-khosts so that we specify the full behaviour wanted as for instance:

awless ssh myinstance ---ignore-khosts -d

justone commented 7 years ago

Very good point. I like the idea of separating the flag out. I'll update the PR.