package for handling config files of ssh like sshd_config and authorized_keys
Project description
chibi_sshd
package for handling config files of ssh like sshd_config and authorized_keys
Free software: WTFPL
Documentation: https://chibi-sshd.readthedocs.io.
Install
pip install chibi-fstab
Usage
cat > /etc/ssh/ssh_config << 'endmsg'
AuthorizedKeysFile .ssh/authorized_keys
PasswordAuthentication yes
ChallengeResponseAuthentication no
UsePAM yes
PrintMotd no
UseDNS no
Subsystem sftp /usr/lib/ssh/sftp-server
AllowUsers Misuzu
endmsg
from chibi_sshd import Chibi_sshd_conf, Chibi_authorized_keys
from chibi.file import Chibi_path
default_file = = Chibi_sshd_conf.default
assert default_file.path == '/etc/ssh/sshd_config'
config = default_file.read()
assert isinstance( config.PasswordAuthentication, bool )
assert config.PasswordAuthentication
config.PasswordAuthentication = False
default_file.write( config )
assert "PasswordAuthentication no" in default_file
authorized_keys = Chibi_authorized_keys(
'/home/Misuzu/.ssh/authorized_keys' )
id_rss_pub = Chibi_path(
'/home/Misuzu/.ssh/id_rss.pub' ).open().read()
if id_rss_pub not in authorized_keys:
authorized_keys.append( id_rss_pub )
assert id_rss_pub in authorized_keys:
History
1.1.0 ( 2026-03-23 )
se cambio el comportamiento para que AllowUsers se parse como lista y si se serializa una cadena la maneja como lista de un elemento
1.0.0 ( 2026-03-22 )
se agrega clase de file para las configuracion de sshd
se agrega clase de file para las llaves authorizadas de los usuarios
0.0.1 ( 2026-03-22 )
First release on PyPI.
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 chibi_sshd-1.1.0.tar.gz.
File metadata
- Download URL: chibi_sshd-1.1.0.tar.gz
- Upload date:
- Size: 9.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
424e5364163fdd1acb7319b1155b233fcd49fbf3929877b9deeb103830814419
|
|
| MD5 |
256fe73795a051f30548478c37ad1c46
|
|
| BLAKE2b-256 |
cf60686a80acef557fee8b66d51a9a30ffb2b7514767241b40ae4a7d7865b8bc
|
File details
Details for the file chibi_sshd-1.1.0-py2.py3-none-any.whl.
File metadata
- Download URL: chibi_sshd-1.1.0-py2.py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7a7065110de973df6bdc327121c6a61e671f636b662110394cde7c894e60eb0d
|
|
| MD5 |
3adc46c76685f7fe4f736b3832c18da7
|
|
| BLAKE2b-256 |
ccc050ed922a1052b4aab3f3ec37fb7bac72276ed88b04c22bb1affee44bab6a
|