api documentation for ssh2 (v0.5.4)

SSH2 client and server modules written in pure JavaScript for node.js

table of contents

  1. module ssh2
    1. function ssh2 ()
    2. function ssh2.Channel (info, client, opts)
    3. function ssh2.Client ()
    4. function ssh2.SFTPWrapper (stream)
    5. function ssh2.Server (cfg, listener)
    6. function ssh2.keepalivemgr (interval, streamInterval, kaCountMax)
    7. function ssh2.super_ ()
    8. object ssh2.Channel.prototype
    9. object ssh2.Client.prototype
    10. object ssh2.SFTPWrapper.prototype
    11. object ssh2.SFTP_OPEN_MODE
    12. object ssh2.SFTP_STATUS_CODE
    13. object ssh2.Server.prototype
    14. object ssh2.keepalivemgr.prototype
    15. object ssh2.utils
  2. module ssh2.Channel
    1. function ssh2.Channel (info, client, opts)
    2. function ssh2.Channel.super_ (options)
    3. number ssh2.Channel.MAX_WINDOW
    4. number ssh2.Channel.PACKET_SIZE
  3. module ssh2.Channel.prototype
    1. function ssh2.Channel.prototype._read (n)
    2. function ssh2.Channel.prototype._write (data, encoding, cb)
    3. function ssh2.Channel.prototype.close ()
    4. function ssh2.Channel.prototype.destroy ()
    5. function ssh2.Channel.prototype.eof ()
    6. function ssh2.Channel.prototype.exit (name, coreDumped, msg)
    7. function ssh2.Channel.prototype.setWindow (rows, cols, height, width)
    8. function ssh2.Channel.prototype.signal (signalName)
  4. module ssh2.Client
    1. function ssh2.Client ()
    2. function ssh2.Client.Server (cfg, listener)
    3. function ssh2.Client.super_ ()
    4. object ssh2.Client.SFTP_OPEN_MODE
    5. object ssh2.Client.SFTP_STATUS_CODE
    6. object ssh2.Client.utils
  5. module ssh2.Client.prototype
    1. function ssh2.Client.prototype.connect (cfg)
    2. function ssh2.Client.prototype.destroy ()
    3. function ssh2.Client.prototype.end ()
    4. function ssh2.Client.prototype.exec (cmd, opts, cb)
    5. function ssh2.Client.prototype.forwardIn (bindAddr, bindPort, cb)
    6. function ssh2.Client.prototype.forwardOut (srcIP, srcPort, dstIP, dstPort, cb)
    7. function ssh2.Client.prototype.openssh_forwardInStreamLocal (socketPath, cb)
    8. function ssh2.Client.prototype.openssh_forwardOutStreamLocal (socketPath, cb)
    9. function ssh2.Client.prototype.openssh_noMoreSessions (cb)
    10. function ssh2.Client.prototype.openssh_unforwardInStreamLocal (socketPath, cb)
    11. function ssh2.Client.prototype.sftp (cb)
    12. function ssh2.Client.prototype.shell (wndopts, opts, cb)
    13. function ssh2.Client.prototype.subsys (name, cb)
    14. function ssh2.Client.prototype.unforwardIn (bindAddr, bindPort, cb)
  6. module ssh2.SFTPWrapper
    1. function ssh2.SFTPWrapper (stream)
    2. function ssh2.SFTPWrapper.super_ ()
  7. module ssh2.SFTPWrapper.prototype
    1. function ssh2.SFTPWrapper.prototype.appendFile (path, data, options, callback_)
    2. function ssh2.SFTPWrapper.prototype.chmod (path, mode, cb)
    3. function ssh2.SFTPWrapper.prototype.chown (path, uid, gid, cb)
    4. function ssh2.SFTPWrapper.prototype.close (handle, cb)
    5. function ssh2.SFTPWrapper.prototype.createReadStream (path, options)
    6. function ssh2.SFTPWrapper.prototype.createWriteStream (path, options)
    7. function ssh2.SFTPWrapper.prototype.end ()
    8. function ssh2.SFTPWrapper.prototype.exists (path, cb)
    9. function ssh2.SFTPWrapper.prototype.ext_openssh_fstatvfs (handle, cb)
    10. function ssh2.SFTPWrapper.prototype.ext_openssh_fsync (handle, cb)
    11. function ssh2.SFTPWrapper.prototype.ext_openssh_hardlink (oldPath, newPath, cb)
    12. function ssh2.SFTPWrapper.prototype.ext_openssh_rename (oldPath, newPath, cb)
    13. function ssh2.SFTPWrapper.prototype.ext_openssh_statvfs (path, cb)
    14. function ssh2.SFTPWrapper.prototype.fastGet (remotePath, localPath, opts, cb)
    15. function ssh2.SFTPWrapper.prototype.fastPut (localPath, remotePath, opts, cb)
    16. function ssh2.SFTPWrapper.prototype.fchmod (handle, mode, cb)
    17. function ssh2.SFTPWrapper.prototype.fchown (handle, uid, gid, cb)
    18. function ssh2.SFTPWrapper.prototype.fsetstat (handle, attrs, cb)
    19. function ssh2.SFTPWrapper.prototype.fstat (handle, cb)
    20. function ssh2.SFTPWrapper.prototype.futimes (handle, atime, mtime, cb)
    21. function ssh2.SFTPWrapper.prototype.lstat (path, cb)
    22. function ssh2.SFTPWrapper.prototype.mkdir (path, attrs, cb)
    23. function ssh2.SFTPWrapper.prototype.open (path, flags, attrs, cb)
    24. function ssh2.SFTPWrapper.prototype.opendir (path, cb)
    25. function ssh2.SFTPWrapper.prototype.read (handle, buf, off, len, position, cb)
    26. function ssh2.SFTPWrapper.prototype.readFile (path, options, callback_)
    27. function ssh2.SFTPWrapper.prototype.readdir (where, opts, cb)
    28. function ssh2.SFTPWrapper.prototype.readlink (path, cb)
    29. function ssh2.SFTPWrapper.prototype.realpath (path, cb)
    30. function ssh2.SFTPWrapper.prototype.rename (oldPath, newPath, cb)
    31. function ssh2.SFTPWrapper.prototype.rmdir (path, cb)
    32. function ssh2.SFTPWrapper.prototype.setstat (path, attrs, cb)
    33. function ssh2.SFTPWrapper.prototype.stat (path, cb)
    34. function ssh2.SFTPWrapper.prototype.symlink (targetPath, linkPath, cb)
    35. function ssh2.SFTPWrapper.prototype.unlink (filename, cb)
    36. function ssh2.SFTPWrapper.prototype.utimes (path, atime, mtime, cb)
    37. function ssh2.SFTPWrapper.prototype.write (handle, buf, off, len, position, cb)
    38. function ssh2.SFTPWrapper.prototype.writeFile (path, data, options, callback_)
  8. module ssh2.Server
    1. function ssh2.Server (cfg, listener)
    2. function ssh2.Server.createServer (cfg, listener)
    3. function ssh2.Server.super_ ()
    4. number ssh2.Server.KEEPALIVE_CLIENT_COUNT_MAX
    5. number ssh2.Server.KEEPALIVE_CLIENT_INTERVAL
    6. number ssh2.Server.KEEPALIVE_INTERVAL
  9. module ssh2.Server.prototype
    1. function ssh2.Server.prototype.address ()
    2. function ssh2.Server.prototype.close (cb)
    3. function ssh2.Server.prototype.getConnections (cb)
    4. function ssh2.Server.prototype.listen ()
    5. function ssh2.Server.prototype.ref ()
    6. function ssh2.Server.prototype.unref ()
  10. module ssh2.keepalivemgr
    1. function ssh2.keepalivemgr (interval, streamInterval, kaCountMax)
  11. module ssh2.keepalivemgr.prototype
    1. function ssh2.keepalivemgr.prototype.add (stream)
    2. function ssh2.keepalivemgr.prototype.remove (stream)
    3. function ssh2.keepalivemgr.prototype.start ()
    4. function ssh2.keepalivemgr.prototype.stop ()
  12. module ssh2.utils
    1. function ssh2.utils.DSAKeySSHToASN1 (key, self, callback)
    2. function ssh2.utils.DSASigBERToBare (signature)
    3. function ssh2.utils.DSASigBareToBER (signature)
    4. function ssh2.utils.ECDSAKeySSHToASN1 (key, self, callback)
    5. function ssh2.utils.ECDSASigASN1ToSSH (signature)
    6. function ssh2.utils.ECDSASigSSHToASN1 (signature, self, callback)
    7. function ssh2.utils.RSAKeySSHToASN1 (key, self, callback)
    8. function ssh2.utils.convertPPKPrivate (keyInfo)
    9. function ssh2.utils.decryptKey (keyInfo, passphrase)
    10. function ssh2.utils.genPublicKey (keyInfo)
    11. function ssh2.utils.isStreamCipher (name)
    12. function ssh2.utils.iv_inc (iv)
    13. function ssh2.utils.parseKey (data)
    14. function ssh2.utils.readInt (buffer, start, stream, cb)
    15. function ssh2.utils.readString (buffer, start, encoding, stream, cb, maxLen)
    16. function ssh2.utils.verifyPPKMAC (keyInfo, passphrase, privateKey)

module ssh2

function ssh2 ()

function ssh2.Channel (info, client, opts)

function ssh2.Client ()

function ssh2.SFTPWrapper (stream)

function ssh2.Server (cfg, listener)

function ssh2.keepalivemgr (interval, streamInterval, kaCountMax)

function ssh2.super_ ()

module ssh2.Channel

function ssh2.Channel (info, client, opts)

function ssh2.Channel.super_ (options)

module ssh2.Channel.prototype

function ssh2.Channel.prototype._read (n)

function ssh2.Channel.prototype._write (data, encoding, cb)

function ssh2.Channel.prototype.close ()

function ssh2.Channel.prototype.destroy ()

function ssh2.Channel.prototype.eof ()

function ssh2.Channel.prototype.exit (name, coreDumped, msg)

function ssh2.Channel.prototype.setWindow (rows, cols, height, width)

function ssh2.Channel.prototype.signal (signalName)

module ssh2.Client

function ssh2.Client ()

function ssh2.Client.Server (cfg, listener)

function ssh2.Client.super_ ()

module ssh2.Client.prototype

function ssh2.Client.prototype.connect (cfg)

function ssh2.Client.prototype.destroy ()

function ssh2.Client.prototype.end ()

function ssh2.Client.prototype.exec (cmd, opts, cb)

function ssh2.Client.prototype.forwardIn (bindAddr, bindPort, cb)

function ssh2.Client.prototype.forwardOut (srcIP, srcPort, dstIP, dstPort, cb)

function ssh2.Client.prototype.openssh_forwardInStreamLocal (socketPath, cb)

function ssh2.Client.prototype.openssh_forwardOutStreamLocal (socketPath, cb)

function ssh2.Client.prototype.openssh_noMoreSessions (cb)

function ssh2.Client.prototype.openssh_unforwardInStreamLocal (socketPath, cb)

function ssh2.Client.prototype.sftp (cb)

function ssh2.Client.prototype.shell (wndopts, opts, cb)

function ssh2.Client.prototype.subsys (name, cb)

function ssh2.Client.prototype.unforwardIn (bindAddr, bindPort, cb)

module ssh2.SFTPWrapper

function ssh2.SFTPWrapper (stream)

function ssh2.SFTPWrapper.super_ ()

module ssh2.SFTPWrapper.prototype

function ssh2.SFTPWrapper.prototype.appendFile (path, data, options, callback_)

function ssh2.SFTPWrapper.prototype.chmod (path, mode, cb)

function ssh2.SFTPWrapper.prototype.chown (path, uid, gid, cb)

function ssh2.SFTPWrapper.prototype.close (handle, cb)

function ssh2.SFTPWrapper.prototype.createReadStream (path, options)

function ssh2.SFTPWrapper.prototype.createWriteStream (path, options)

function ssh2.SFTPWrapper.prototype.end ()

function ssh2.SFTPWrapper.prototype.exists (path, cb)

function ssh2.SFTPWrapper.prototype.ext_openssh_fstatvfs (handle, cb)

function ssh2.SFTPWrapper.prototype.ext_openssh_fsync (handle, cb)

function ssh2.SFTPWrapper.prototype.ext_openssh_hardlink (oldPath, newPath, cb)

function ssh2.SFTPWrapper.prototype.ext_openssh_rename (oldPath, newPath, cb)

function ssh2.SFTPWrapper.prototype.ext_openssh_statvfs (path, cb)

function ssh2.SFTPWrapper.prototype.fastGet (remotePath, localPath, opts, cb)

function ssh2.SFTPWrapper.prototype.fastPut (localPath, remotePath, opts, cb)

function ssh2.SFTPWrapper.prototype.fchmod (handle, mode, cb)

function ssh2.SFTPWrapper.prototype.fchown (handle, uid, gid, cb)

function ssh2.SFTPWrapper.prototype.fsetstat (handle, attrs, cb)

function ssh2.SFTPWrapper.prototype.fstat (handle, cb)

function ssh2.SFTPWrapper.prototype.futimes (handle, atime, mtime, cb)

function ssh2.SFTPWrapper.prototype.lstat (path, cb)

function ssh2.SFTPWrapper.prototype.mkdir (path, attrs, cb)

function ssh2.SFTPWrapper.prototype.open (path, flags, attrs, cb)

function ssh2.SFTPWrapper.prototype.opendir (path, cb)

function ssh2.SFTPWrapper.prototype.read (handle, buf, off, len, position, cb)

function ssh2.SFTPWrapper.prototype.readFile (path, options, callback_)

function ssh2.SFTPWrapper.prototype.readdir (where, opts, cb)

function ssh2.SFTPWrapper.prototype.readlink (path, cb)

function ssh2.SFTPWrapper.prototype.realpath (path, cb)

function ssh2.SFTPWrapper.prototype.rename (oldPath, newPath, cb)

function ssh2.SFTPWrapper.prototype.rmdir (path, cb)

function ssh2.SFTPWrapper.prototype.setstat (path, attrs, cb)

function ssh2.SFTPWrapper.prototype.stat (path, cb)

function ssh2.SFTPWrapper.prototype.symlink (targetPath, linkPath, cb)

function ssh2.SFTPWrapper.prototype.unlink (filename, cb)

function ssh2.SFTPWrapper.prototype.utimes (path, atime, mtime, cb)

function ssh2.SFTPWrapper.prototype.write (handle, buf, off, len, position, cb)

function ssh2.SFTPWrapper.prototype.writeFile (path, data, options, callback_)

module ssh2.Server

function ssh2.Server (cfg, listener)

function ssh2.Server.createServer (cfg, listener)

function ssh2.Server.super_ ()

module ssh2.Server.prototype

function ssh2.Server.prototype.address ()

function ssh2.Server.prototype.close (cb)

function ssh2.Server.prototype.getConnections (cb)

function ssh2.Server.prototype.listen ()

function ssh2.Server.prototype.ref ()

function ssh2.Server.prototype.unref ()

module ssh2.keepalivemgr

function ssh2.keepalivemgr (interval, streamInterval, kaCountMax)

module ssh2.keepalivemgr.prototype

function ssh2.keepalivemgr.prototype.add (stream)

function ssh2.keepalivemgr.prototype.remove (stream)

function ssh2.keepalivemgr.prototype.start ()

function ssh2.keepalivemgr.prototype.stop ()

module ssh2.utils

function ssh2.utils.DSAKeySSHToASN1 (key, self, callback)

function ssh2.utils.DSASigBERToBare (signature)

function ssh2.utils.DSASigBareToBER (signature)

function ssh2.utils.ECDSAKeySSHToASN1 (key, self, callback)

function ssh2.utils.ECDSASigASN1ToSSH (signature)

function ssh2.utils.ECDSASigSSHToASN1 (signature, self, callback)

function ssh2.utils.RSAKeySSHToASN1 (key, self, callback)

function ssh2.utils.convertPPKPrivate (keyInfo)

function ssh2.utils.decryptKey (keyInfo, passphrase)

function ssh2.utils.genPublicKey (keyInfo)

function ssh2.utils.isStreamCipher (name)

function ssh2.utils.iv_inc (iv)

function ssh2.utils.parseKey (data)

function ssh2.utils.readInt (buffer, start, stream, cb)

function ssh2.utils.readString (buffer, start, encoding, stream, cb, maxLen)

function ssh2.utils.verifyPPKMAC (keyInfo, passphrase, privateKey)

[ this document was created with utility2 ]