| Summary: | StrictHostKeyChecking=no works with changed 1024 bit RSA hostkeys but fails when 2048 RSA | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Portable OpenSSH | Reporter: | Andy Hart <Andy.Hart1> | ||||
| Component: | ssh | Assignee: | Assigned to nobody <unassigned-bugs> | ||||
| Status: | CLOSED WORKSFORME | ||||||
| Severity: | enhancement | CC: | djm | ||||
| Priority: | P5 | ||||||
| Version: | 7.6p1 | ||||||
| Hardware: | amd64 | ||||||
| OS: | Linux | ||||||
| Attachments: |
|
||||||
|
Description
Andy Hart
2020-01-17 21:39:49 AEDT
Could you please attach a debug trace ("ssh -vvv ...") from a client experiencing this problem?
Created attachment 3352 [details]
SSH debug connection output as requested
The debug output (ssh -vvv….) if from a ubuntu ssh client, connecting to a CentOS ssh server. For this capture, the SSH server has a 2048bit RSA host key. The client started with an empty known_hosts file, and made a first connection. It accepted and stored the SSH servers host key. I then modified the stored key in the clients known hosts file, and repeated the SSH connection , this time with the "-vvv" option . The connection failed with a warning about a MITM attack, i.e. despite the "StrictHostKeyChecking=no" set in the config file it did NOT accept the changed key. However, if I repeat this test with a 1024bit RSA key on the SSH server and no MITM attack is reported
Regards,
Andy
This is the intended behaviour. StrictHostKeyChecking controls whether ssh accepts a *new* hostkey automatically. It is not intended to disable host key checking entirely. I'd generally recommend against doing that, because an on-path attacker can trivially MITM your connections. If you really want to do this, then the easiest way is to pass "-oUserKnownHostsFile=/dev/null -oStrictHostKeyChecking=no" to ssh. closing resolved bugs as of 8.6p1 release |