mirror of
https://github.com/atmoz/sftp.git
synced 2024-11-17 12:51:33 -05:00
Update README.md
This commit is contained in:
parent
e2e83abd9f
commit
fe107107af
1 changed files with 12 additions and 6 deletions
18
README.md
18
README.md
|
@ -103,10 +103,13 @@ docker run \
|
|||
Tip: you can use [atmoz/makepasswd](https://hub.docker.com/r/atmoz/makepasswd/) to generate encrypted passwords:
|
||||
`echo -n "your-password" | docker run -i --rm atmoz/makepasswd --crypt-md5 --clearfrom=-`
|
||||
|
||||
## Using SSH key (and no password)
|
||||
## Logging in with SSH keys
|
||||
|
||||
Mount all public keys in the user's `.ssh/keys/` directory. All keys are automatically
|
||||
appended to `.ssh/authorized_keys`.
|
||||
Mount public keys in the user's `.ssh/keys/` directory. All keys are
|
||||
automatically appended to `.ssh/authorized_keys` (you can't mount this file
|
||||
directly, because OpenSSH requires limited file permissions). In this example,
|
||||
we do not provide any password, so the user `foo` can only login with his SSH
|
||||
key.
|
||||
|
||||
```
|
||||
docker run \
|
||||
|
@ -117,9 +120,11 @@ docker run \
|
|||
foo::1001
|
||||
```
|
||||
|
||||
## Using custom SSH key for server
|
||||
## Providing your own SSH host key
|
||||
|
||||
This container will generate an ssh-key for OpenSSH at first run. To avoid this, you can map Ed25519 or RSA keys from the host inside the container.
|
||||
This container will generate new SSH host keys at first run. To avoid that your
|
||||
users get a MITM warning when you recreate your container (and the host keys
|
||||
changes), you can mount your own host keys.
|
||||
|
||||
```
|
||||
docker run \
|
||||
|
@ -130,7 +135,8 @@ docker run \
|
|||
foo::1001
|
||||
```
|
||||
|
||||
Tip: you can generate keys with this commands:
|
||||
Tip: you can generate your keys with these commands:
|
||||
|
||||
```
|
||||
ssh-keygen -t ed25519 -f /host/ssh_host_ed25519_key < /dev/null
|
||||
ssh-keygen -t rsa -b 4096 -f /etc/ssh/ssh_host_rsa_key < /dev/null
|
||||
|
|
Loading…
Reference in a new issue