Skip to content

Support options for authorized SSH keys - #54

Open
jrs65 wants to merge 2 commits into
jirutka:masterfrom
jrs65:fix-key-options
Open

jrs65 wants to merge 2 commits into
jirutka:masterfrom
jrs65:fix-key-options

Conversation

@jrs65

@jrs65 jrs65 commented Feb 2, 2023

Copy link
Copy Markdown

SSH keys can be given a set of options that control their behaviour when logging in (these are documented in here). These are given at the front of the key line like:

command="bbcp SRC",no-port-forwarding ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAYQCkNCKyyUPvwwefhEpnD/Khuowbv+13Cv3shWY3ck3j+hbHLqjCGUB66/igg0Atf3giU7sZOdPrSN6xdX43+k6Gn73yzWFJkWyImKzgHW9uVrU7vo3puailY+yC6RpwNME= flynn@encom.com

These options do not need to be understood by ssh-ldap-pubkey but at the moment the validation logic fails on key lines that contain them as it presumes the key type is the first entry. This PR improves the key parsing logic to understand these options and correctly extract the key type, data and comment field.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant