Skip to content

Commit

Permalink
Merge pull request #117 from feross/master
Browse files Browse the repository at this point in the history
Support SSH password authentication
  • Loading branch information
apocas authored Apr 2, 2020
2 parents 3d793be + b565f55 commit 5dfc3d1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/modem.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ var Modem = function (options) {
this.host = opts.host;
this.port = opts.port;
this.username = opts.username;
this.password = opts.password;
this.version = opts.version;
this.key = opts.key;
this.cert = opts.cert;
Expand Down Expand Up @@ -206,7 +207,7 @@ Modem.prototype.buildRequest = function (options, context, data, callback) {
var connectionTimeoutTimer;

var opts = self.protocol === 'ssh' ? Object.assign(options, {
agent: ssh({ 'host': self.host, 'port': self.port, 'username': self.username, 'agent': self.sshAuthAgent }),
agent: ssh({ 'host': self.host, 'port': self.port, 'username': self.username, 'password': self.password, 'agent': self.sshAuthAgent }),
protocol: 'http:'
}) : options;

Expand Down

0 comments on commit 5dfc3d1

Please sign in to comment.