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

Passwords, Windows, and Error bubbling, oh my #21

Merged
merged 9 commits into from
May 20, 2020

Conversation

rathboma
Copy link
Contributor

@rathboma rathboma commented May 14, 2020

FYI - Love this library, by far the simplest and most obvious implementation of a SSH tunnel library. Thank you for making it!

Included in this PR:

  • Connection errors properly reject the promise
  • The SSH agent detection now supports Windows and Putty
  • The SSH connection now supports password auth
  • Users can provide a custom agent socket

@rathboma rathboma changed the title Connection errors are now bubbled up Passwords, Windows, and Error bubbling, oh my May 15, 2020
@rathboma
Copy link
Contributor Author

I think I'm done with this. Please let me know if you have any feedback or changes. Would love to be able to include a new version of this lib properly in my app!

@Junkern
Copy link
Collaborator

Junkern commented May 17, 2020

Oh, very nice! Could you update the README with the two new connection options? I also thought about tests for the windows agent detection, but I assume that you are using this feature already, so it must be working ;)

@rathboma
Copy link
Contributor Author

Sure! Actually haven't tested the windows agent yet, but it is according to the docs. It should be tested in the next couple of days

@rathboma
Copy link
Contributor Author

rathboma commented May 19, 2020

A few more changes

  • ssh agent pass-through works (haven't tested pageant on windows yet)
  • connection.connect() can actually throw an exception if you have an encrypted private key and no password is provided, solved that
  • If you use an agent, you shouldn't read the private key. If the key is encrypted it throws an error, rather than using the agent

@rathboma
Copy link
Contributor Author

Honestly, it probably shouldn't read id_rsa by default, but I've maintained that behavior for backwards compatibility, but added an override

@Junkern
Copy link
Collaborator

Junkern commented May 20, 2020

Awesome, thank you so much for the contribution! Your PR will land as 0.7.0 in a bit ;)

@Junkern Junkern closed this May 20, 2020
@Junkern Junkern reopened this May 20, 2020
@Junkern Junkern merged commit c7fd875 into Stocard:master May 20, 2020
@rathboma
Copy link
Contributor Author

Thanks! Also - confirmed Pageant is working :-)

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

Successfully merging this pull request may close these issues.

2 participants