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

Can not find ssh_id file using ~/ prefix #53

Closed
lcrodriguez opened this issue Jul 4, 2016 · 2 comments
Closed

Can not find ssh_id file using ~/ prefix #53

lcrodriguez opened this issue Jul 4, 2016 · 2 comments

Comments

@lcrodriguez
Copy link

I have a problem with this because it's not reading the key file using ~/.ssh/ssh_id.pub shortcut.
It's says the file does not exist but of course it does. I have to put the real path to work, which is /User/leo/.ssh/ssh_id.pub but does it very specific to my machine.
Any workarounds to this? I want any user with permissions to be able to deploy to the server.

@VuongN
Copy link

VuongN commented Dec 5, 2017

You could do it this way:

var fs = require('fs'),
      os = require('os'),
      path = require('path'),
      privKey = fs.readFileSync(path.join(os.homedir(), '.ssh/id_rsa'));

@mojavelinux
Copy link
Contributor

This library does not work directly with the private key path. It only works with the private key data. It's up to you to resolve and read the file. Therefore, I think this issue can be closed.

But I do think that this library should accept a privateKey path, which is what #68 is about. Then we could interpret the ~.

@zensh zensh closed this as completed in 4b7a6bc Feb 10, 2018
zensh added a commit that referenced this issue Feb 10, 2018
resolves #53 allow private key file to be specified; expand leading ~
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

3 participants