Package Exports
- tunnel-ssh
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (tunnel-ssh) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Tunnel-SSH
This is a public test of the upcoming release 1.0.0
Examples
See the examples for further configuration options. The config object is passed to the ssh2 config, if you have problems connecting to a server check the ssh2 docs.
Minimal:
var tunnel = require('tunnel-ssh');
var config = {
host: '172.16.0.8',
dstPort: 3306
};
var server = tunnel(config, function (error, result) {
//you can start using your resources here. (mongodb, mysql, ....)
console.log('connected');
});
Map local port to 3000
var config = {
host: '172.16.0.8',
username: 'root',
dstPort: 3306,
localPort: 3000
};
var server = tunnel(config, function (error, result) {
console.log('connected');
});