Skip to content

Commit

Permalink
Merge pull request #4 from visoft/master
Browse files Browse the repository at this point in the history
Added passphase option for privateKey
  • Loading branch information
broerse committed Apr 5, 2020
2 parents 6a086cf + a125ca1 commit 5c3de54
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,15 @@ RSA key file. You must upload a public key to the remote server before attemptin

*Default:* `undefined`


### passphrase

For passphrase protected privateKeys.

If you pass this value `privateKey` must be set.

*Default:* `undefined

### agent

Path to ssh-agent's UNIX socket for ssh-agent-based user authentication (when your private keys are loaded into your agent). You must upload a public key to the remote server before attempting to upload any content. Windows users: set to 'pageant' for authenticating with Pageant or (actual) path to a cygwin "UNIX socket."
Expand Down
6 changes: 5 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ module.exports = {
privateKey: function(context) {
return context.privateKey;
},
passphrase: function(context) {
return context.passphrase;
},
agent: function(context) {
return context.agent;
},
Expand All @@ -51,7 +54,8 @@ module.exports = {
remoteDir: this.readConfig('remoteDir'),
privateKey: this.readConfig('privateKey') && fs.readFileSync(this.readConfig('privateKey')),
agent: this.readConfig('agent'),
password: this.readConfig('password')
password: this.readConfig('password'),
passphrase: this.readConfig('passphrase')
},
sftp = new Sftp(options);

Expand Down

0 comments on commit 5c3de54

Please sign in to comment.