sshd

package module
v0.0.0-...-d433a87 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 28, 2018 License: MIT Imports: 12 Imported by: 0

README

go-sshd

A simple sshd implemented in golang, with asciicast support.

Currently it only implemented interactive shell through ssh. Functions like running command, ssh forwarding will come later.

There is likely to be some security issue with this project at the moment. Make sure not to run this on production server.

Installation

go get github.com/inoc603/go-sshd/cmd

Developement

Build the project with:

make build

Run the built program:

make fg

Usage

TODO

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DummyRecorder

type DummyRecorder struct{}

func (*DummyRecorder) WriteInput

func (r *DummyRecorder) WriteInput(b []byte)

func (*DummyRecorder) WriteOutput

func (r *DummyRecorder) WriteOutput(b []byte)

type Option

type Option func(s *Server) error

func WithAddress

func WithAddress(addr string) Option

func WithAuth

func WithAuth(a interface{}) Option

func WithHostFile

func WithHostFile(f string) Option

func WithRecorder

func WithRecorder(r RecorderFactory) Option

func WithUserStore

func WithUserStore(us auth.UserStore) Option

type Recorder

type Recorder interface {
	WriteInput(b []byte)
	WriteOutput(b []byte)
}

type RecorderFactory

type RecorderFactory func(ssh.Session) (Recorder, error)

type Server

type Server struct {
	// contains filtered or unexported fields
}

func NewServer

func NewServer(opts ...Option) (*Server, error)

func (*Server) Start

func (s *Server) Start() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL