Socket
Socket
Sign inDemoInstall

github.com/hnakamur/go-sshd

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/hnakamur/go-sshd


Version published
Created
Source

go-sshd PkgGoDev MIT licensed

A sshd written in Go. Forked from github.com/jpillora/go-and-ssh. Only supported request types are exec, shell, pty-req, window-change, and sftp subsystem.

This sshd is NOT production ready. I use this sshd for testing purpose only.

Example usage

Run the example server.

Get the source.

go get github.com/hnakamur/go-sshd
cd $GOPATH/src/github.com/hnakamur/go-sshd/example

Generate the sever host key.

ssh-keygen -t rsa -b 2048 -f id_rsa -N ''

Run the server at the address 127.0.0.1:2022

go run main.go

Run a ssh client

Run a ssh client. You can see the password in the example source.

$ ssh -o UserKnownHostsFile=/dev/null -p 2022 foo@127.0.0.1
The authenticity of host '[127.0.0.1]:2022 ([127.0.0.1]:2022)' can't be established.
RSA key fingerprint is SHA256:wr...(masked)...wc.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '[127.0.0.1]:2022' (RSA) to the list of known hosts.
foo@127.0.0.1's password:
$ ls
id_rsa  id_rsa.pub  main.go
$ exit
exit
Connection to 127.0.0.1 closed.

License

MIT

FAQs

Package last updated on 14 Apr 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc