Skip to main content

package for handling config files of ssh like sshd_config and authorized_keys

Project description

chibi_sshd

https://img.shields.io/pypi/v/chibi_sshd.svg Documentation Status

package for handling config files of ssh like sshd_config and authorized_keys

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

chibi_sshd-1.1.0.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

chibi_sshd-1.1.0-py2.py3-none-any.whl (4.5 kB view details)

Uploaded Python 2Python 3

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

Hashes for chibi_sshd-1.1.0.tar.gz
Algorithm Hash digest
SHA256 424e5364163fdd1acb7319b1155b233fcd49fbf3929877b9deeb103830814419
MD5 256fe73795a051f30548478c37ad1c46
BLAKE2b-256 cf60686a80acef557fee8b66d51a9a30ffb2b7514767241b40ae4a7d7865b8bc

See more details on using hashes here.

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

Hashes for chibi_sshd-1.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 7a7065110de973df6bdc327121c6a61e671f636b662110394cde7c894e60eb0d
MD5 3adc46c76685f7fe4f736b3832c18da7
BLAKE2b-256 ccc050ed922a1052b4aab3f3ec37fb7bac72276ed88b04c22bb1affee44bab6a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page