GithubHelp home page GithubHelp logo

skyformat99 / ssh2go Goto Github PK

View Code? Open in Web Editor NEW

This project forked from karfield/ssh2go

0.0 2.0 0.0 67 KB

go wrapper for libssh (both client and server side)

Go 90.25% C 7.84% Shell 0.81% Ruby 1.10%

ssh2go's Introduction

libssh to go

libssh is a mulitplatform C library implementing the SSHv2 and SSHv1 protocol on client and server side. With libssh, you can remotely execute programs, transfer files, use a secure and transparent tunnel, manage public keys and much more. www.libssh.org

ssh2go is Go bindings for libssh. The master branch follows the latest libssh code.

Installing

ssh2go depends on libssh, so make sure you've installed the Lastest git version of libssh

For Mac OS (darwin)

use homebrew

brew install --HEAD https://raw.githubusercontent.com/karfield/ssh2go/master/libssh.rb

go get github.com/karfield/ssh2go

If you have installed libssh but not the latest version in Mac OS, you should reinstall it:

brew reinstall --HEAD https://raw.githubusercontent.com/karfield/ssh2go/master/libssh.rb
brew link --force libssh

Build from scratch

If you want to build the libssh from scratch, use the './install-libs.sh' to install the prequisitements.

go get -d github.com/karfield/ssh2go

cd $GOPATH/src/github.com/karfield/ssh2go

git submodule update --init --recursive

./install-libs.sh

go install

Examples

simple-sshd

Custom a sshd, and run it locally.

Try now or read the code

go install github.com/karfield/ssh2go/examples/ssh2go-simple-sshd

see some options:

option shortcuts default description
port p 2222 Set the port to bind.
hostkey k Set the hostkey file path.
dsakey d Set the dsa key.
rsakey r Set the rsa key.
verbose V Get verbose output.

run it:

ssh2go-simple-sshd --dsakey=/path/to/your/dsakey --rsakey=/path/to/your/rsakey --port 8888 -V

then open another terminal, run as a client:

ssh localhost -p 8888 -l test

multi-sshd

like simple-sshd, to run as server:

ssh2go-multi-sshd --dsakey=/path/to/your/dsakey --rsakey=/path/to/your/rsakey --port 8888 -V

Note:

granted user and password: test / test

ssh2go's People

Contributors

karfield avatar powermacros avatar

Watchers

 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.