/deno_libssh2

Bindings to libssh2 for interacting with SSH servers and executing remote commands, forwarding local ports, etc.

Primary LanguageCMIT LicenseMIT

deno_libssh2

Deno bindings for libssh2, using Deno FFI.

Usage

flags:

  • --allow-ffi: Requires ffi access to "ssh2.dll", "libssh2.so", "libssh2.dylib"
  • --unstable: FFI is unstable feature
import { loadlibssh2 } from "https://deno.land/x/libssh2/mod.ts";

const lib = loadlibssh2("libssh2.so");

const ptr = lib.libssh2_version(0); // return type `const char *`
// output: 4396015458

const version = Deno.UnsafePointerView.getCString(ptr);
// output: 1.10.0

Examples

deno run --allow-ffi --unstable https://deno.land/x/libssh2/examples/basic.ts

License

deno_libssh2 is released under the MIT License. See the bundled LICENSE file for details.