Skip to content

A Clojure library for interacting with SSH servers using libssh2 under the hood.

License

Notifications You must be signed in to change notification settings

conormcd/clj-libssh2

Repository files navigation

clj-libssh2

A Clojure library for interacting with SSH servers using libssh2 under the hood. There are two parts to this library:

  1. A small API for doing most common SSH and SCP operations. You should use this for all new code using this library. Examples of usage can be found in doc/Primary-API.md.
  2. A JNA wrap of all of the functions and constants in the public API of libssh2. You should use this if you need to do something unusual. Please file an issue or pull request with details of what you end up using this for, so that I can expand the main API. Some notes on this API can be found in doc/libssh2.md.

Function by function documentation for the latest release should always be available at: http://conormcd.github.io/clj-libssh2/

Quick Start

user=> (require '[clj-libssh2.ssh :as ssh])
nil
user=> (ssh/exec {:hostname "127.0.0.1"} "uptime")
{:out "18:40  up 155 days, 19:04, 4 users, load averages: 2.45 1.76 1.66\n",
:err "", :exit 0, :signal {:exit-signal nil, :err-msg nil, :lang-tag nil}}

See doc/Primary-API.md for more examples.

Release information

Releases are done automatically via CircleCI. Release builds can be found on Clojars and on GitHub. Every release tags this repository with the version number as well, so commands like git log 0.1.69..0.1.72 and git diff 0.1.69..0.1.72 should be usable to find out what's happened between releases.

The latest release is:

Version numbers are structured as follows: MAJOR.MINOR.BUILD-NUMBER. The first, major version number will only be incremented for breaking changes to the primary public API of this library. The second, minor number will be incremented if either there's a backwards-incompatible change in other APIs exposed by this library OR if the bundled version of libssh2 changes. The last portion is the build number from CircleCI. Only green builds on the master branch trigger a release so these numbers will be non-sequential and will not reset to zero when the major/minor portions are incremented.

N.B. All versions before 0.2.x should be considered early development and should not be used in production. APIs may be added/changed/removed without warning.

License

The majority of this library is released under a two clause BSD-style license. The only exceptions to this are the bundled libraries which have their own licenses:

About

A Clojure library for interacting with SSH servers using libssh2 under the hood.

Resources

License

Stars

Watchers

Forks

Packages

No packages published