Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Commented out lines throw exception #21

Closed
Rocco83 opened this issue Nov 16, 2016 · 2 comments
Closed

Commented out lines throw exception #21

Rocco83 opened this issue Nov 16, 2016 · 2 comments

Comments

@Rocco83
Copy link

Rocco83 commented Nov 16, 2016

Hi,

commented lines gives this error:

Traceback (most recent call last):
[...]
ssh_obj.parse()
File "[...]/sshpubkeys/init.py", line 399, in parse
key_parts = self._split_key(keydata)
File "[...]/sshpubkeys/init.py", line 206, in _split_key
self.options = self.parse_options(self.options_raw)
File "[...]/sshpubkeys/init.py", line 267, in parse_options
parse_add_single_option(opt)
File "[...]/sshpubkeys/init.py", line 240, in parse_add_single_option
raise InvalidOptionNameException("%s is not valid option name." % opt_name)
sshpubkeys.exceptions.InvalidOptionNameException: #ssh-rsa is not valid option name.

@ojarva
Copy link
Owner

ojarva commented Nov 16, 2016

Can you clarify when you get this error? #ssh-rsa is indeed not a valid public key line. The library does not handle parsing full authorized_keys files (including empty and commented-out lines) - that you have to either implement and create a new pull request, or handle on your own code.

@Rocco83
Copy link
Author

Rocco83 commented Nov 17, 2016

Absolutely clear :) closing this issue, opening a new one to handle fully the files authorized_keys file.

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

No branches or pull requests

2 participants