Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fxfactorial/ocaml-libssh
:computer: OCaml bindings to libssh
https://github.com/fxfactorial/ocaml-libssh
Last synced: about 1 month ago
JSON representation
:computer: OCaml bindings to libssh
- Host: GitHub
- URL: https://github.com/fxfactorial/ocaml-libssh
- Owner: fxfactorial
- Created: 2015-08-29T22:51:04.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2016-01-03T18:13:01.000Z (almost 9 years ago)
- Last Synced: 2024-07-31T22:57:05.109Z (3 months ago)
- Language: C
- Homepage: http://hyegar.com
- Size: 192 KB
- Stars: 14
- Watchers: 3
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This is an OCaml binding to the C library, [libssh](https://www.libssh.org).
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.
```ocaml
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.