Gathering detailed insights and metrics for ssh-http-agent
Gathering detailed insights and metrics for ssh-http-agent
Gathering detailed insights and metrics for ssh-http-agent
Gathering detailed insights and metrics for ssh-http-agent
npm install ssh-http-agent
Typescript
Module System
Node Version
NPM Version
67.6
Supply Chain
96.9
Quality
75.2
Maintenance
50
Vulnerability
100
License
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
6 Stars
11 Commits
2 Forks
2 Watchers
1 Branches
1 Contributors
Updated on Feb 11, 2025
Latest Version
0.1.7
Package Id
ssh-http-agent@0.1.7
Size
4.57 kB
NPM Version
5.6.0
Node Version
9.3.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
ssh-http-agent
An HTTP Agent for tunneling through SSH
npm install --save ssh-http-agent
Simple tunnel via 1.2.3.4
:
1const sshAgent = require("ssh-http-agent"); 2const http = require("http"); 3 4http.get( 5 { 6 agent: sshAgent.http({ 7 host: "1.2.3.4", 8 port: 22, 9 username: "root", 10 password: "supersecret" 11 }), 12 host: "echo.jpillora.com", 13 path: "/foo/bar" 14 }, 15 res => { 16 console.log(res.headers); 17 } 18);
Nested tunnels:
1const sshAgent = require("ssh-http-agent"); 2const http = require("http"); 3 4http.get( 5 { 6 agent: sshAgent.http([ 7 { 8 host: "first.hop.com", 9 username: "root", 10 password: "supersecret" 11 }, 12 { 13 host: "second.hop.com", 14 username: "root", 15 password: "supersecret" 16 } 17 ]), 18 host: "third.hop.com", 19 path: "/foo/bar" 20 }, 21 res => { 22 console.log(res.headers); 23 } 24);
With request
:
1const sshAgent = require("ssh-http-agent"); 2const request = require("request"); 3 4request.get( 5 "http://echo.jpillora.com/foo/bar", 6 { 7 agent: sshAgent.http({ 8 host: "1.2.3.4", 9 username: "root", 10 password: "supersecret" 11 }) 12 }, 13 (err, res, body) => { 14 console.log(err || body); 15 } 16);
Create an agent with:
sshAgent(httpAgent, sshConfig, opts)
sshAgent.http(sshConfig, opts)
sshAgent.https(sshConfig, opts)
Where:
httpAgent
is an instance of
http.Agent
or
https.Agent
sshConfig
is one or many ssh2
client configuration
objects(https://github.com/mscdex/ssh2#client-methods)opts
is an object with:
debug
is a boolean
which enabled debug printingdisconnectDelay
is a number
representing milliseconds to wait before
closing idle ssh connections, by default its set to 0ms, so as soon as the
last request completes, the parent ssh connection will be closed.Copyright © 2017 Jaime Pillora <dev@jpillora.com>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
2 existing vulnerabilities detected
Details
Reason
Found 0/11 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
license file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More