kellyjonbrazil / jc

CLI tool and python library that converts the output of popular command-line tools, file-types, and common strings to JSON, YAML, or Dictionaries. This allows piping of output to tools like jq and simplifying automation scripts.
MIT License
7.93k stars 209 forks source link

feature authorized_keys parser #589

Open DEvil0000 opened 2 months ago

DEvil0000 commented 2 months ago

authorized_keys files parser e.g. ~/.ssh/authorized_keys. maybe asciitable parser or ssh/sshd parser could do that when extended.

third column "comment" is optional as well as the last lines trailing new line is optional.

example input: ssh-rsa AAAhdhkfjhsfsgsfkjhgkufsghru= optionalComment

example output: [{"type": "ssh-rsa", "key": "AAAhdhkfjhsfsgsfkjhgkufsghru=", "comment": "optionalComment"}]