Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Support options for authorized SSH keys #54

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jrs65
Copy link

@jrs65 jrs65 commented Feb 2, 2023

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.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant