Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
x/crypto/ssh: Add tools for parsing a user's .ssh/config file #18781
It's nice to be able to type "ssh nickname" and have the details loaded from your
Having to parse this file manually to figure out e.g. which IdentityFile to use and which user to authenticate as is a major blocker to using the primitives in x/crypto/ssh. Maybe it could parse into a
The closest thing I've been able to find in the wild is https://godoc.org/github.com/moul/advanced-ssh-config/pkg/config, which seems like it should do the right thing. Unfortunately I was unable to use it to successfully parse my own SSH config file; there's some problem with it attempting to use a yaml parser to parse the file, or I'm passing it the wrong thing.
Apologies if this issue has been submitted before, I searched the issues list and couldn't find anything.
I think this shouldn't be in the x/crypto/ssh package. The config file is not a standard, and does not need access to any of the internals of the package.
openssh predates YAML's popularity by a large margin. Are you sure yaml is the right technology for parsing the file?