New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

github.com/flipb/sftp-server

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/flipb/sftp-server

  • v0.0.0-20201119213526-6c8b855c6c87
  • Source
  • Go
  • Socket score

Version published
Created
Source

TODOs

  • make it so you cannot delete the root folder. This probably involves reworking/moving pathSanitize call.
  • finish unit tests

Build with nix

nix-build .
./result/bin/server -h

Testing sftp-server (with go run)

Generate a keypair (PEM encoded) to use as SSH Hostkeys on server

go run ./cmd/server -generate > keys.pem

Generating a password hash for a user

go run ./cmd/sever -user root -plaintextPassword toor

Running

# Run SFTP server for user 'root' password 'toor' and take SSH keys from Stdin
# When you have a single file with both private and public key
cat keys.pem | go run ./cmd/server -user root -passwordHash d6aa6f8195f195aba1442934e28f20dd7c7ea342dd37cbb1ff422a15962f21e9 -hostkey - -endpoint 127.0.0.1:2222
# Run SFTP server for user 'root' password 'toor' and take SSH keys from file `keys.pem`
go run ./cmd/server -hostkey ./keys.pem -passwordHash d6aa6f8195f195aba1442934e28f20dd7c7ea342dd37cbb1ff422a15962f21e9 -endpoint 127.0.0.1:2222

Running with systemd socket activtion. Systemd will start the server and pass a socket. Server will automatically exit after being idle for 10 seconds.

# Here we're running the compiled server binary (rather than using `go run`)
systemd-socket-activate -l 2211 ./result/bin/server -socket -exit -hostkey ./keys.pem -passwordHash d6aa6f8195f195aba1442934e28f20dd7c7ea342dd37cbb1ff422a15962f21e9

FAQs

Package last updated on 19 Nov 2020

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