Sign inSign up

shourai/docker-rssh

By shourai

•Updated almost 6 years ago

Minimal scp, sftp and rsync docker container

Image
0

388

shourai/docker-rssh repository overview

⁠RSSH

Simple and minimal restricted secure shell for SFTP, SCP and RSYNC.

This image can be downloaded from dockerhub

docker pull shourai/docker-rssh

⁠Examples

⁠Single user
  docker run -d \
  -v $(pwd)/data:/home/<username> \
  -e username=<username> -e password=<password> \
  -p 2222:22 \
  --name rssh shourai/docker-rssh
⁠Logging in

The OpenSSH server runs by default on port 22, and in this example, we are forwarding the container's port 22 to the host's port 2222. To log in with an OpenSSH client, run: sftp -P 2222 foo@<host-ip>, sftp -P 2222 <SRC> <DST> or rsync -e 'ssh -p 2222' <SRC> <DST>

⁠Using SSH key

Create the file /home/<user>/.ssh/authorized_keys in a mounted directory or mount the file at this location. The standard username is canary

docker run -d \
    -v $HOME/.ssh/authorized_keys:/home/<username>/.ssh/authorized_keys:ro \
    -v $(pwd)/data:/home/<username> \
    -p 2222:22 \
    --name rssh shourai/docker-rssh

Tag summary

Content type

Image

Digest

Size

5 MB

Last updated

almost 6 years ago

docker pull shourai/docker-rssh