| Summary: | Environment fails to provide cryptographic identity of remote party | ||
|---|---|---|---|
| Product: | Portable OpenSSH | Reporter: | walter.stanish |
| Component: | sshd | Assignee: | Assigned to nobody <unassigned-bugs> |
| Status: | CLOSED FIXED | ||
| Severity: | enhancement | CC: | djm, dtucker, frbrgeorge |
| Priority: | P5 | Keywords: | low-hanging-fruit, needs-release-note |
| Version: | 5.9p1 | ||
| Hardware: | All | ||
| OS: | All | ||
|
Description
walter.stanish
2012-12-24 01:50:09 AEDT
Further note: the classic SSH_CONNECTION environment variable is not useful in our deployment as the cloud nodes will move about frequently (thus IP and port combination are too temporary to be meaningful). Assuming you're using public-key authentication (it's not clear if you're that or hostbased) you can use the "environment=" key directive in authorized_keys to implement something like this already, eg: environment="SSH_KEY=key1" AAAA[...]1 environment="SSH_KEY=key2" AAAA[...]2 see the section on "AUTHORIZED_KEYS FILE FORMAT" in sshd(8). Note that you'll need to enable PermitUserEnvironment in sshd_config for this to work. Thanks, that method worked. Given the implicit overhead of maintaining a modified authorized keys file, perhaps some kind of public key identifier environment variable might still be a useful (if optional) feature. Happy holidays :) actually I'd like to see something a bit more general: now that we have AuthenticationMethods, expose which ones were actually used as a comma-separated list with some optional identifying information, something like: SSH_AUTH_METHODS=password SSH_AUTH_METHODS=publickey(RSA;md5;11:22:33:44:55:66:77:88:99:aa:bb:cc:dd:ee) SSH_AUTH_METHODS=keyboard-interactive,publickey(RSA;md5;11:22:33:44:55:66:77:88:99:aa:bb:cc:dd:ee) not sure how much work this would be, though. How about a single environment variable that represents the most unique identifier available for the remote party, as viewed in terms of the authentication subsystem? This could be a hash like: <local_sshd_keyid_as_salt>:<scheme>:<scheme-specific data> Or perhaps simply: <scheme>:<scheme-specific data> In addition, detailed data such as that you suggest could be made available in separate, authentication-scheme-linked variables. *** Bug 1821 has been marked as a duplicate of this bug. *** This has been possible since the addition of the sshd_config ExposeAuthInfo directive, added in OpenSSH 7.6 closing bugs resolved before openssh-8.9 |