Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A hookable ssh server for node.js using libssh

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 examples
Octocat-spinner-32 src
Octocat-spinner-32 README.markdown
Octocat-spinner-32 index.js
Octocat-spinner-32 package.json
Octocat-spinner-32 wscript
README.markdown

ssh

Create ssh servers in node.js!

status

This module has all kinds of problems since the node.js thread pool does not play nicely with libssh.

example

simple echo shell

var ssh = require('ssh');

ssh.createServer(function (session) {
    session.on('password', function (user, pass, cb) {
        cb(user === 'foo' && pass === 'bar');
    });

    session.on('shell', function (sh) {
        sh.pipe(sh); // echo on
    });
}).listen(2222);

installation

You'll need a version of libssh with my patches:

git clone git://github.com/substack/libssh.git master
cd libssh && mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=$PREFIX -DCMAKE_BUILD_TYPE=Debug ..
make && make install

That should install libssh.pc, which is used by pkg-config during the wscript installation. Make sure libssh.pc got installed into your $PKG_CONFIG_PATH someplace.

You can then install with npm:

npm install ssh
Something went wrong with that request. Please try again.