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

Authenticate from in-memory keypair #77

Closed
jonhoo opened this issue Feb 6, 2018 · 7 comments
Closed

Authenticate from in-memory keypair #77

jonhoo opened this issue Feb 6, 2018 · 7 comments

Comments

@jonhoo
Copy link

jonhoo commented Feb 6, 2018

libssh2 has libssh2_userauth_publickey_frommemory, which allows you to authenticate a user using an in-memory keypair. It apparently only works when linking against OpenSSL, but given that we do that on cfg(unix), providing this method under #[cfg(unix)] seems like something we could do?

@alexcrichton
Copy link
Owner

Sounds plausible to me!

@JMLX42
Copy link

JMLX42 commented Jul 10, 2018

Hi there,

I want to use libgit2's git_cred_ssh_key_memory_new. See this issue: https://github.com/alexcrichton/git2-rs/issues/320

I'm using the ssh2 crate in my app (in addition to git2). Yet I see this error:

this version of libgit2 was not built with ssh memory credentials

@alexcrichton
Copy link
Owner

@promethe42 it may mean that libgit2 didn't correctly detect libssh2 support or otherwise something different is missing? I'm not entirely sure :(

@JMLX42
Copy link

JMLX42 commented Jul 30, 2018

LibSSH2 has support for WinCNG.
When I remove the #[cfg(unix)] above userauth_pubkey_memory it builds fine.

I'll see if it also runs fine :)

@JMLX42
Copy link

JMLX42 commented Aug 5, 2018

Ok I tried to make it work on Windows but to no avail.

What I did instead to make SSH auth more seamless is to parse ~/.ssh/config. Grammar is here:

https://github.com/aerys/gpm/blob/master/src/gpm/ssh_config.pest

@wez
Copy link
Collaborator

wez commented Jul 24, 2019

Can this issue be closed? It sounds like #80 resolved the original request. If there's something else left to do, can that be opened as a separate issue?

@jonhoo
Copy link
Author

jonhoo commented Jul 25, 2019

Yes, I think you're right that this is closed by #80!

@jonhoo jonhoo closed this as completed Jul 25, 2019
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

4 participants