
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
passport-ssh
Advanced tools
Passport strategy for authenticating with ssh.
$ npm install passport-ssh
The ssh strategy authenticates users using ssh
. You
can specify server credentials to attempt to ssh into. For example:
Basic setup using ssh daemon running on localhost:22
passport.use(new SSHStrategy());
if i tried to login as user bob
, the equivalent ssh command would be:
$ ssh bob@localhost
Example using custom hostname and port
passport.use(new SSHStrategy({
host: "ec2-54-124-59-274.us-west-2.compute.amazonaws.com",
port: 2200
}));
if i tried to login as user ubuntu
, the equivalent ssh command would be:
$ ssh -p 2200 ubuntu@ec2-54-124-59-274.us-west-2.compute.amazonaws.com
You can optionally provide a verify
callback to handle custom edge cases
passport.use(new SSHStrategy(
function(user, done) {
done(null, user);
}
));
Use passport.authenticate(), specifying the 'ssh' strategy, to authenticate requests.
app.get('/secret', passport.authenticate('ssh', { failureRedirect: '/login' }),
function(req, res) {
res.redriect("/");
}
);
nah
FAQs
SSH authentication for passport
The npm package passport-ssh receives a total of 1 weekly downloads. As such, passport-ssh popularity was classified as not popular.
We found that passport-ssh demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.