GithubHelp home page GithubHelp logo

sshdog's Introduction

SSHDog

SSHDog is your go-anywhere lightweight SSH server. Written in Go, it aims to be a portable SSH server that you can drop on a system and use for remote access without any additional configuration.

Useful for:

  • Tech support
  • Backup SSHD
  • Authenticated remote bind shells

Supported features:

  • Windows & Linux
  • Configure port, host key, authorized keys
  • Pubkey authentication (no passwords)
  • Port forwarding
  • SCP (but no SFTP support)

Example usage:

% go build .
% ssh-keygen -t rsa -b 2048 -N '' -f config/ssh_host_rsa_key
% echo 2222 > config/port
% cp ~/.ssh/id_rsa.pub config/authorized_keys
% rice append --exec sshdog
% ./sshdog
[DEBUG] Adding hostkey file: ssh_host_rsa_key
[DEBUG] Adding authorized_keys.
[DEBUG] Listening on :2222
[DEBUG] Waiting for shutdown.
[DEBUG] select...

Author: David Tomaschik [email protected]

This is not a Google product, merely code that happens to be owned by Google.

sshdog's People

Contributors

hengwu0 avatar matir avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

sshdog's Issues

have errors

./sshdog 
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x5c9a46]

goroutine 1 [running]:
debug/elf.(*Section).ReadAt(0xc0001c2000?, {0xc0001cc000?, 0x270?, 0x24?}, 0x40?)
	<autogenerated>:1 +0x26
archive/zip.readDirectoryEnd({0x6c79c0, 0xc000164d00}, 0x210)
	/usr/local/go/src/archive/zip/reader.go:526 +0xf5
archive/zip.(*Reader).init(0xc000150a10, {0x6c79c0?, 0xc000164d00}, 0x210)
	/usr/local/go/src/archive/zip/reader.go:97 +0x5c
archive/zip.NewReader({0x6c79c0, 0xc000164d00}, 0x210)
	/usr/local/go/src/archive/zip/reader.go:90 +0x5e
github.com/daaku/go%2ezipexe.zipExeReaderElf({0x6c7de0?, 0xc000014048}, 0x60e369)
	/root/go/pkg/mod/github.com/daaku/[email protected]/zipexe.go:128 +0x8b
github.com/daaku/go%2ezipexe.NewReader({0x6c7de0, 0xc000014048}, 0x0?)
	/root/go/pkg/mod/github.com/daaku/[email protected]/zipexe.go:48 +0x98
github.com/daaku/go%2ezipexe.OpenCloser({0xc00001e6f0?, 0xc000119d10?})
	/root/go/pkg/mod/github.com/daaku/[email protected]/zipexe.go:30 +0x57
github.com/GeertJohan/go%2erice.init.0()
	/root/go/pkg/mod/github.com/!geert!johan/[email protected]/appended.go:42 +0x65

Race condition in SCP errors

SCP errors are not delivered consistently. This might be a race in closing the channel before the message is delivered?

Example usage has unnecessary invocation of rice.

Example usage text includes this line:

% rice append --exec sshdog

However, if that is done, get this output

no calls to rice.FindBox() or rice.MustFindBox() found in import path github.com/Matir/sshdog

So it is a no-op.

Need an 'if (!windows)' check around pty allocation.

Running sshdog on Windows causes messages like this in the log:

[DEBUG] Failed allocating pty: Unsupported platform

Since it is Windows, and that will never work, it would be better to skip the pty allocation altogether in that case.

Haven't looked at the source, yet. Just saw this today.

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.