A small, production-oriented SSH daemon implemented with Paramiko.
Project description
py-simple-sshd
py-simple-sshd is a compact SSH daemon implemented with Paramiko. It is meant
for cases where you need an embeddable, cross-platform SSH entry point that can
launch a configured local shell after public-key or password-file authentication.
Installation
pip install py-simple-sshd
Usage
simple-sshd \
--host 0.0.0.0 \
--port 2222 \
--shell /bin/bash \
--authorized-keys /etc/simple-sshd/authorized_keys
Password authentication is disabled unless --password-file is provided:
simple-sshd \
--host 127.0.0.1 \
--port 2222 \
--shell /bin/bash \
--authorized-keys ~/.ssh/authorized_keys \
--password-file /etc/simple-sshd/password.txt
When both --authorized-keys and --password-file are configured, clients can
authenticate with either a listed public key or the password read from the file.
If --password-file is omitted, only public-key authentication is available.
On Windows, use a Windows shell path such as:
simple-sshd --host 127.0.0.1 --port 2222 --shell C:\Windows\System32\cmd.exe --password-file .\password.txt
Options
--host: address to bind, default127.0.0.1--port: TCP port to bind, default2222--shell: shell executable launched for authenticated sessions--authorized-keys: OpenSSHauthorized_keysfile for public-key auth--password-file: text file whose content is accepted as the SSH password--host-key: private SSH host key; generated under~/.simple-sshdif omitted--log-level:DEBUG,INFO,WARNING,ERROR, orCRITICAL
Notes
- Password files are read as UTF-8 text. Trailing line endings are removed, while other whitespace is preserved.
- Host keys are persistent by default so clients can verify the server identity.
- POSIX systems use a real pty for terminal sessions. Windows terminal sessions
use
pywinpty; non-pty sessions use standard process pipes.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file py_simple_sshd-0.1.1.tar.gz.
File metadata
- Download URL: py_simple_sshd-0.1.1.tar.gz
- Upload date:
- Size: 11.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.4.1 CPython/3.11.15 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cae0f9ecc8757a0a6595028c27118f26bd9f8f495ed652a9947f075483c6a1ec
|
|
| MD5 |
2660219a038ce07350deeb7d4bc7a0e8
|
|
| BLAKE2b-256 |
e90f08412e0dd95168ed2170203fc5fe17f49075cd76d898685e4af8295d359b
|
File details
Details for the file py_simple_sshd-0.1.1-py3-none-any.whl.
File metadata
- Download URL: py_simple_sshd-0.1.1-py3-none-any.whl
- Upload date:
- Size: 13.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.4.1 CPython/3.11.15 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c10db50681074102ea2033a80a8f64843db544431a6e4d3e0273917b5d97fbf
|
|
| MD5 |
6ad4425b6d4695ce0c937fd85adca5ed
|
|
| BLAKE2b-256 |
f6efc6743f8fac32f62f2488a1dbe58d1c8daa50345f2dbd9bdd12ec995b20af
|