Ssh2.nim Save

Async SSH, SCP and SFTP client for Nim, using libssh2 wrapper [WIP]

Project README

ssh2.nim

High level async SSH, SCP and SFTP client for Nim, using libssh2 wrapper

Usage

import asyncdispatch, ssh2, ssh2/scp

proc main() {.async.} =
  var client = newSSHClient()
  defer: client.disconnect()
  await client.connect("127.0.0.1", "root", Port(2222), password="root")
  echo await client.execCommand("uptime")

waitFor main()

Development

In order to run tests, you can use a Docker instance with sshd installed.

For example:

# Host: 127.0.0.1
# Port: 2222
# Username: root
# Password: root

docker run -d --name test_sshd -p 2222:22 rastasheep/ubuntu-sshd:16.04
Open Source Agenda is not affiliated with "Ssh2.nim" Project. README Source: ba0f3/ssh2.nim
Stars
37
Open Issues
0
Last Commit
1 week ago
Repository
License
MIT

Open Source Agenda Badge

Open Source Agenda Rating