GithubHelp home page GithubHelp logo

luigy / ocaml-libssh Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fxfactorial/ocaml-libssh

0.0 3.0 0.0 99 KB

:computer: OCaml bindings to libssh

Home Page: http://hyegar.com

Makefile 7.07% OCaml 42.69% C 50.25%

ocaml-libssh's Introduction

This is an OCaml binding to the C library, libssh.

All code is kept under the Ssh module with Ssh.Client implementing client side ssh and Ssh.Server providing the server side (although that isn't implemented yet, client seems more important at the moment).

Examples

Here is a simple usage at the moment.

let () = 
  let a_session = Ssh.init () in
  (* Remote Debian machine *)
  let opts = Ssh.Client.({ host = "some.machine.with.ssh";
                           log_level = SSH_LOG_NOLOG;
                           port = 22;
                           username = "some.user.name";
                           auth = Auto; })
  in
  Ssh.Client.connect opts a_session;
  a_session |> Ssh.Client.exec ~command:"uname -a" |> print_endline;
  Ssh.close a_session

Right now you can either use Auto or Interactive for the authentication, the latter having libssh ask you on the command line for password authentication.

Goals

My goals with this library

  1. Make it stable
  2. Do real concurrent ssh copying and command execution.

ocaml-libssh's People

Contributors

fxfactorial avatar

Watchers

Luigy Leon avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.