mikeal / sequest

Simplified API for SSH and SFTP similar to request.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

username connection option is not used

digitalsurgeon opened this issue · comments

Hej

So in the readme.md file you describe

Connection Options
...
username - < string > - Username for authentication. Default: (none)

but it seems after looking at the code that the only way to specify the username is by putting it in the host string i.e. sequest("username@host")

and if you specify it like so:

var stream = sequest(ssh_hub.host, {
username: ssh_hub.username,
privateKey: require('fs').readFileSync(ssh_hub.privateKey)
})

then username is will still be fetched from ssh_hub.host string and if it is not there then it defaults to root.

if that is correct? than there is a bug in your readme.md file.

thanks

This is fixed in the current code as of PR #17

The new code just hasn't been published to npm. To get the fix, just require the package from git. For safety, fork it and require your fork to be sure it doesn't change out from under you.

@mikeal Any chance of a push to npm?

v0.8.0 published.