| Summary: | Unable to add deprecated KexAlgorithms back for host via config file | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Portable OpenSSH | Reporter: | Nathan Neulinger <nneul> | ||||
| Component: | ssh | Assignee: | Assigned to nobody <unassigned-bugs> | ||||
| Status: | CLOSED INVALID | ||||||
| Severity: | major | CC: | djm, jjelen | ||||
| Priority: | P5 | ||||||
| Version: | 8.2p1 | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Attachments: |
|
||||||
|
Description
Nathan Neulinger
2020-06-20 02:51:45 AEST
Some further digging - it appears it's not exactly as described. It's obeying the config when the config is SIMPLE. But if I put: KexAlgorithms +diffie-hellman-group1-sha1 it's like it's getting stuck with the default, and ignoring any other changes. Trying to find more detail. I was able to work around this... Maybe it's expected, but there appears to be something "magic" about adding group1-sha1 that interferes with incrementally adding other entries. Adding all of them in one shot appears to work fine even on current versions. Please, post the complete debug log and check what is in all the configuration files (also included if you have some). AH, I think I now understand what the problem is with what I was doing. The KexAlgorithms config setting in config file ONLY WORKS ONCE. i.e. you cannot do: KexAlgorithms +diffie-hellman-group1-sha1 KexAlgorithms +diffie-hellman-group-exchange-sha1 but when specified via command line, it appears to allow another override (or it's being processed first). Above snippet results in it listing group1-sha1, but NOT the group-exchange-sha1. Is that "one shot" expected? It sure doesn't appear that way from documentation. Created attachment 3413 [details]
Trace of ssh -vvv
Example trace with this conf file in /tmp/testconf:
KexAlgorithms diffie-hellman-group14-sha1
KexAlgorithms +diffie-hellman-group1-sha1
KexAlgorithms +diffie-hellman-group-exchange-sha1
and invoked as:
ssh -F /tmp/testconf -vvv root@localhost id >/tmp/trace.txt 2>&1
This appears to be long standing behavior, I had always had the +diffie-hellman-group1-sha1 and only noticed the change with upgrade to Ubuntu20 when the group-exchange-sha1 was also removed in current versions. This is expected behaviour - ssh'd config is "first match wins" for most configuration options. I.e only the first configuration option is considered. This is documented at the start of ssh_config(1): "For each parameter, the first obtained value will be used." You should be able to do: KexAlgorithms +diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1 to get the behaviour you want. Totally explains the behavior, sorry for the wasted time. Thank you. close bugs that were resolved in OpenSSH 8.5 release cycle |