A hookable ssh server for node.js using libssh
C++ JavaScript C
Latest commit a7959f0 Apr 15, 2011 @substack added status to readme
Failed to load latest commit information.
examples pipe() and update the example to just be an echo server Mar 20, 2011
src explicit mutex handling stubs Mar 25, 2011
README.markdown added status to readme Apr 14, 2011
index.js no more need for messy clientObj, just use client->handle_ Mar 24, 2011
package.json updated install script in the package.json Mar 20, 2011



Create ssh servers in node.js!


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


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


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
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