🔐 Sid Gifari File Manager Pro
v8.0.5 | 2026-08-07 10:16:47 | PHP 8.2.32
📂
/ (Root)
/
usr
/
lib
/
python3.6
/
site-packages
/
cloudinit
/
config
/
__pycache__
📍 /usr/lib/python3.6/site-packages/cloudinit/config/__pycache__
🔄 Refresh
✏️
Editing: cc_ssh_authkey_fingerprints.cpython-36.opt-1.pyc
Read Only
3 \�me� � @ s� U d Z ddlZddlZddlZddlmZmZ ddlmZ ddl m Z ddlmZm Z ddlmZmZ ddlmZ dd lmZ d Zddd eegeddgg d�Zee e�Z eje�Zdd� Zddd�Zdd� Zddd�Zee eedd�dd�Z dS ) z;SSH AuthKey Fingerprints: Log fingerprints of user SSH keys� N)�ssh_util�util)�Cloud)�Config)� MetaSchema�get_meta_doc)�ALL_DISTROS�ug_util)�PER_INSTANCE)�SimpleTablez�Write fingerprints of authorized keys for each user to log. This is enabled by default, but can be disabled using ``no_ssh_fingerprints``. The hash type for the keys can be specified, but defaults to ``sha256``. Zcc_ssh_authkey_fingerprintszSSH AuthKey Fingerprintsz!Log fingerprints of user SSH keyszno_ssh_fingerprints: truezauthkey_hash: sha512)�id�name�title�descriptionZdistrosZ frequencyZexamplesZactivate_by_schema_keysc C s8 g }x.t dt| �d�D ]}|j| ||d � � qW |S )Nr � )�range�len�append)Zbin_hashZsplit_up�i� r �1/usr/lib/python3.6/cc_ssh_authkey_fingerprints.py�_split_hash, s r �sha256c C sR | sdS y,t j|�}|jtj| �� djt|j� ��S tt fk rL dS X d S )N� �:�?) �hashlib�new�update�base64Z b64decode�joinr Z hexdigest� TypeError� ValueError)Zb64_text� hash_methZhasherr r r �_gen_fingerprint3 s r$ c C s: t | j| j| j| jg�r6| jr6| jj� j� tjkr6dS dS )NTF) �any�keytyper �comment�options�lower�stripr ZVALID_KEY_TYPES)�entryr r r �_is_printable_keyB s r, � ci-info: c C s� |s$d|| f }t j|ddd� d S dd| ddg}t|�}xH|D ]@}t|�rB|jpVd t|j|�pdd |jpld |jptd g} |j | � qBW |j � } | j� }tt |td ��}t jd|| f d|�g} | j|� x$| D ]}t jd ||f ddd� q�W d S )Nz9%sno authorized SSH keys fingerprints found for user %s. TF)�console�stderrZKeytypezFingerprint (%s)ZOptions�Comment�-)�keyz#Authorized keys from %s for user %s�+z%s%s )�textr/ r. )r Z multi_logr r, r&