| Server IP : 3.7.136.76 / Your IP : 216.73.216.142 Web Server : Apache/2.4.58 (Ubuntu) System : Linux ip-172-31-39-148 7.0.0-1010-aws #10~24.04.1-Ubuntu SMP PREEMPT Mon Jul 27 17:41:33 UTC 2026 x86_64 User : ubuntu ( 1000) PHP Version : 8.3.6 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /snap/core22/2955/usr/share/subiquity/subiquitycore/__pycache__/ |
Upload File : |
o
K��^) � @ sv d dl Z d dlZd dlZd dlmZ e �d�Zdd� Zdd� Ze d�Z
d Ze d
�Zdd� Z
d
d� Zdd� Zdd� ZdS )� N)�run_commandzsubiquitycore.sshc C s| t ddg�} | jdkrt�d| j� g S g }| j�� D ]}|�d�r-|�|� dd�d � qg }|D ] }|�
t|�� q2|S )zzQuery sshd to find the host keys and then fingerprint them.
Returns a sequence of (key-type, fingerprint) pairs.
�sshdz-Tr zsshd -T failed %rzhostkey N� )r �
returncode�log�debug�stderr�stdout�
splitlines�
startswith�append�split�extend�fingerprints)�config�keyfiles�line�info�keyfile� r �)/usr/share/subiquity/subiquitycore/ssh.py�host_key_fingerprints s
�r c C s| g }t dd| g�}|jdkrt�d| |j� |S |j�� D ]}|�� �dd�� � }|d }|d �d �}|�
||f� q|S )
Nz
ssh-keygenz-lfr zssh-keygen -lf %s failed %r�
� r ���z())r r r r r r r
�strip�replacer
r )r r �cpr �parts�fingerprint�keytyper r r r , s
r zThe host key fingerprints are:
z$
{keytype:{width}} {fingerprint}z9The {keytype} host key fingerprint is:
{fingerprint}
c C s
t t� �S )N)�summarize_host_keysr r r r r �
host_key_infoG s
r"