Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sgaunet/alpine-sshd
No frills, simple alpine based SSHD server
https://github.com/sgaunet/alpine-sshd
Last synced: 14 days ago
JSON representation
No frills, simple alpine based SSHD server
- Host: GitHub
- URL: https://github.com/sgaunet/alpine-sshd
- Owner: sgaunet
- Created: 2022-02-03T13:15:59.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2024-07-22T19:08:02.000Z (5 months ago)
- Last Synced: 2024-07-22T22:53:42.233Z (5 months ago)
- Language: Shell
- Size: 36.1 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SSH Server
This is a simple alpine based SSHD server
* A user is dedicated for SSH connection (named sshuser)
* The /data directory is dedicated to transfer files (The way I use it)
* Every files older than 5min will be deleted
* Listening on port 22
* Authentication can be done by SSH keys or password
You can use it inside kubernetes.## Security features:
* The user root's password is un-assigned.
* The container expects a ENV variable named "AUTHORIZED_KEYS" containing your SSH public key in it. If this ENV var is found empty, this container does not start. This prevents it becoming an open-(ssh)-relay.So simply pass your ssh public key as env var AUTHORIZED_KEYS to the container at run time, and you are good to go. You can actually pass multiple SSH public keys by putting them in one file, and then letting the entire file load as a string in this ENV variable. For example:
```
AUTHORIZED_KEYS="$(cat .ssh/my_many_ssh_public_keys_in_one_file.txt)"
```# Deployment
In the deploy folder, there are:
* a docker folder with a docker-compose file to launch it
* a k8s folder with the manifests# Development
This project is using :
* [task for development](https://taskfile.dev/#/)
* docker
* [venom for tests](https://github.com/ovh/venom)# Docker images
The github actions is producing two docker images:
* ghcr.io/sgaunet/alpine-sshd:latest (replace latest with the last tag)
* docker.io/sgaunet/alpine-sshd:latest (replace latest with the last tag)