npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@r3npi2/cordova-plugin-sshclient

v0.2.0

Published

A Cordova SSH Client Plugin based on Ganymed SSH2

Readme

Cordova SSH Client Plugin

A Cordova SSH Client Plugin based on Ganymed SSH2.

Supported Platforms

  • Android

##Recomended

If you're going to use this plugin inside an AngularJS project, we recomend you to install Angular SSH Client from here.

Example

Take a look at the example on Angular SSH Client project.

Installation

  • cordova plugin add https://github.com/R3nPi2/cordova-plugin-sshclient.git

Methods

window.sshClient.sshOpenSession(function(success){...},function(error){...},hostname,port,username,password,cols,rows,width,height)

Connects to host, request a new PTY and starts a Shell.

Arguments

  • hostname – Hostname or IP.
  • port – SSH port number.
  • user – Username.
  • password – Password.
  • cols – PTY columns.
  • rows – PTY rows.
  • width – (optional: if empty, set to 0) PTY pixels width.
  • height – (optional: if empty, set to 0) PTY pixels height.

Success response

  • Returns sessionID: an integer corresponding to session unique identifier.

Error response

  • Returns a string describing the error.

window.sshClient.sshVerifyHost(function(success){...},function(error){...},hostname,port,saveHostKey)

We should use this method to verify hostkeys.

Arguments

  • hostname – Hostname or IP.
  • port – SSH port number.
  • saveHostKey – This argument should be a string matching "true" or "false". If "false", the verification should be done but hostkey will not be saved into known_hosts database. If "true", hostkey should be saved into known_hosts.

Success response

  • If saveHostKey was set to "true": returns "ADD_OK" string if everithing goes fine and hostkey is saved into known_hosts file.
  • If saveHostKey was set to "false", and hostkey allready exists into known_hosts, and hostkey is valid: returns "OK" string.
  • If saveHostKey was set to "false", and hostkey allready exists into known_hosts, but hostkey has changed: returns describing the situation.
  • If saveHostKey was set to "false", and hostkey does not exists into known_hosts, returns a string with hostkey.

Error response

  • Returns a string describing the error.

window.sshClient.sshResizeWindow(function(success){...},function(error){...},sessionID,cols,rows,width,height)

We can use this method to resize PTY created on window.sshClient.sshOpenSession.

Arguments

  • sessionID – session identifier.
  • cols – PTY columns.
  • rows – PTY rows.
  • width – (optional: if empty, set to 0) PTY pixels width.
  • height – (optional: if empty, set to 0) PTY pixels height.

Success response

  • A string with PTY dimensions.

Error response

  • Returns a string describing the error.

window.sshClient.sshRead(function(success){...},function(error){...},sessionID)

Read stdout and stderr buffers output.

Arguments

  • sessionID – session identifier.

Success response

  • Returns characters read from stdout and stderr buffers.

Error response

  • Returns a string describing the error.

window.sshClient.sshWrite(function(success){...},function(error){...},sessionID,string)

Write a string to stdin buffer.

Arguments

  • sessionID – session identifier.
  • string – String that will be written to stdin buffer. If you want to send a ls command, you should write "ls\n".

Success response

  • Returns written command.

Error response

  • Returns a string describing the error.

window.sshClient.sshCloseSession(function(success){...},function(error){...},sessionID)

Close ssh session.

Arguments

  • sessionID – session identifier.

Success response

  • Returns "0". It means everithing was ok.

Error response

  • Returns a string describing the error.

window.sshClient.sshSetKnownHosts(function(success){...},function(error){...},knownHosts)

Pending documentation.

Arguments

  • knownHosts - A string containing a list of known hosts keys. Formated known_hosts-like file.

Success response

  • Returns "0". It means everithing was ok.

Error response

  • Returns a string describing the error.

window.sshClient.sshGetKnownHosts(function(success){...},function(error){...})

Pending documentation.

Success response

  • Returns a string corresponding to known_hosts file. One host per line.

Error response

  • Returns a string describing the error.

Author

Ganymed SSH-2 for Java

This plugin includes src/android/libs/ssh2.jar, which is a compressed package of Ganymed SSH-2 for Java libraries. Take a look at Ganymed SSH-2 for Java for more information.

Ganymed SSH-2 for Java package was slightly modified to fit the needs of this plugin.

Take a look at GANYMED-SSH-2-LICENSE license file for licensing information.

You can find libraries documentation here or in Ganymed SSH-2 for Java home page.

Take a look to NOTES.md file if you want to know how I packaged this libraries.

License

  • Cordova SSH Client Plugin is released under the GNU Affero General Public License version 3. Read LICENSE file.
  • The Ganymed SSH-2 for Java library is released under a BSD style license. The Java implementations of the AES, Blowfish and 3DES ciphers have been taken (and slightly modified) from the cryptography package released by The Legion Of The Bouncy Castle. Please read GANYMED-SSH-2-LICENSE file.
  • SSH is a registered trademark of SSH Communications Security Corp in the United States and in certain other jurisdictions. Java and J2ME are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries. All other names and marks are property of their respective owners.

Issues

Report at the github issue tracker