Skip to content

Commit 2f5717a

Browse files
committed
Merge pull request #3 from bastianl/master
allow custom remote ssh port
2 parents 88c63fc + 0a45815 commit 2f5717a

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

README.md

+6
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,12 @@ The local port for the forwarding.
9090

9191
*Default:* a random port between `49151` and `65535`
9292

93+
### port
94+
95+
The ssh port on the destination server.
96+
97+
*Default:* `22`
98+
9399
### privateKeyPath
94100

95101
The local path to your ssh private key.

index.js

+2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ module.exports = {
1919
name: options.name,
2020
defaultConfig: {
2121
dstPort: 6379,
22+
port: 22,
2223
dstHost: 'localhost',
2324
srcPort: function() {
2425
var range = MAX_PORT_NUMBER - MIN_PORT_NUMBER + 1;
@@ -41,6 +42,7 @@ module.exports = {
4142

4243
var sshConfig = {
4344
host: this.readConfig('host'),
45+
port: this.readConfig('port'),
4446
dstPort: this.readConfig('dstPort'),
4547
dstHost: this.readConfig('dstHost'),
4648
username: this.readConfig('username'),

tests/unit/index-nodetest.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ describe('ssh-tunnel plugin', function() {
106106

107107
return previous;
108108
}, []);
109-
assert.equal(messages.length, 4);
109+
assert.equal(messages.length, 5);
110110
});
111111

112112
it('adds default config to the config object', function() {

0 commit comments

Comments
 (0)