Giter Site home page Giter Site logo

sftp-app's Introduction

SFTP Server

Every time I need to configure an SFTP Server, I find many details related to different Linux distribution and details.

This project allows the sysadmins to run an SFTP Server into a container using some basic features like:

  • Choose the SFTP Port;
  • Use a priv/pub key to login;
  • Configure users into a JSON file;
  • Limit max connections for each user;

File Structure

  • users.json: Sample configuration file with two test users (the private keys are available into sample_data folder. It could be mapped to your users.json file.

  • ./home: Sample home folder. This folder must be mapped outside the container (to a local folder or docker volume);

  • ./sample_data: Sample public and private keys

Building the Container

sudo docker build . -t sftp

Running the Container

sudo docker run --rm --name sftp -p 22000:22000 --privileged -v $(pwd)/home:/home -v $(pwd)/users.json:/app/users.json sftp

Snippets

ssh-keygen

When the command above ask about filename, I suggest to create the file in current folder and set the username. This command will output two files: [username] and [username.pub]

Into users.json insert into pubkey user attribute the [username.pub] file content.

To connect to your SFTP Server: sftp -i [username] -P 22000 [username]@localhost

sftp-app's People

Contributors

aguergolet avatar

Watchers

James Cloos avatar  avatar

sftp-app's Issues

Problems with usernames containing "."

When I use an user name with "." into users.json, the directory permissions haven't set correctly (including the .ssh folder).

The user couldn't connect.

Sample usernames:

Andre.jose
andre.guergolet

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.