ó
    &ÝNj2k  ã                   óò   • S r SSKrSSKrSSKrSSKrSSKrSSKrSSKJr  SSK	J
r
  SSKJr  Su  rr SSKrSSKJrJr  S	r " S
 S5      rS r " S S5      r " S S\5      rg! \ a  r\r SrCN:SrCff = f)z2
Configuration file (aka ``ssh_config``) support.
é    N)Úpartial)Úsha1)ÚStringIO)NNé   )ÚConfigParseErrorÚCouldNotCanonicalizeé   c                   óì   • \ rS rSrSr\R                  " S5      r/ SQS// SQ/ SQ/ SQ/ S	QS
.rS r	\
S 5       r\
S 5       r\
S 5       rS rS rSS jrS rS rS rS rS rS rS rS rS rS rSrg)Ú	SSHConfigé-   ag  
Representation of config information as stored in the format used by
OpenSSH. Queries can be made via `lookup`. The format is described in
OpenSSH's ``ssh_config`` man page. This class is provided primarily as a
convenience to posix users (since the OpenSSH format is a de-facto
standard on posix) but should work fine on Windows too.

.. versionadded:: 1.6
z(\w+)(?:\s*=\s*|\s+)(.+))ú%Cú%hú%lú%Lú%nú%pú%rú%ur   )r   Ú~ú%dr   r   r   r   )r   r   r   r   )r   r   r   )	r   r   r   r   r   r   r   r   r   )ÚcontrolpathÚhostnameÚidentityfileÚproxycommandÚ	proxyjumpú
match-execc                 ó   • / U l         g)a  
Create a new OpenSSH config object.

Note: the newer alternate constructors `from_path`, `from_file` and
`from_text` are simpler to use, as they parse on instantiation. For
example, instead of::

    config = SSHConfig()
    config.parse(open("some-path.config")

you could::

    config = SSHConfig.from_file(open("some-path.config"))
    # Or more directly:
    config = SSHConfig.from_path("some-path.config")
    # Or if you have arbitrary ssh_config text from some other source:
    config = SSHConfig.from_text("Host foo\n\tUser bar")
N©Ú_config)Úselfs    ÚL/home/mande/repo/quber/.venv/lib/python3.13/site-packages/paramiko/config.pyÚ__init__ÚSSHConfig.__init__G   s   € ð& ˆ�ó    c                 ó6   • U R                  [        U5      5      $ )zO
Create a new, parsed `SSHConfig` from ``text`` string.

.. versionadded:: 2.7
)Ú	from_filer   )ÚclsÚtexts     r!   Ú	from_textÚSSHConfig.from_text\   s   € ð �}‰}œX d›^Ó,Ð,r$   c                 óp   • [        U5       nU R                  U5      sSSS5        $ ! , (       d  f       g= f)zZ
Create a new, parsed `SSHConfig` from the file found at ``path``.

.. versionadded:: 2.7
N)Úopenr&   )r'   ÚpathÚflos      r!   Ú	from_pathÚSSHConfig.from_pathe   s#   € ô �$ŒZ˜3Ø—=‘= Ó%÷ �Z�Zús   Œ'§
5c                 ó6   • U " 5       nUR                  U5        U$ )zX
Create a new, parsed `SSHConfig` from file-like object ``flo``.

.. versionadded:: 2.7
)Úparse)r'   r.   Úobjs      r!   r&   ÚSSHConfig.from_fileo   s   € ñ ‹eˆØ�	‰	�#ŒØˆ
r$   c                 ó„  • S/0 S.nU GH˜  nUR                  5       nU(       a  UR                  S5      (       a  M3  [        R                  " U R                  U5      nU(       d  [        SR                  U5      5      eUR                  S5      R                  5       nUR                  S5      nUS;   aQ  U R                  R                  U5        S0 0nUS	:X  a  U R                  U5      US	'   Mæ  U R                  U5      US
'   Mü  US:X  a  UR                  5       S:X  a  SUS   U'   GM!  UR                  S5      (       a  UR                  S5      (       a  USS nUS;   a.  XRS   ;   a  US   U   R                  U5        GMz  U/US   U'   GM†  XRS   ;  d  GM‘  XbS   U'   GM›     U R                  R                  U5        g)zv
Read an OpenSSH config from the given file object.

:param file_obj: a file-like object to read the config file from
Ú*)ÚhostÚconfigÚ#zUnparsable line {}r   é   )r7   Úmatchr8   r7   Úmatchesr   ÚnoneNÚ"éÿÿÿÿ)r   ÚlocalforwardÚremoteforward)ÚstripÚ
startswithÚrer;   ÚSETTINGS_REGEXr   ÚformatÚgroupÚlowerr   ÚappendÚ
_get_hostsÚ_get_matchesÚendswith)r    Úfile_objÚcontextÚliner;   ÚkeyÚvalues          r!   r2   ÚSSHConfig.parsez   s¥  € ð  ˜5¨BÑ/ˆÜˆDð —:‘:“<ˆDæ˜4Ÿ?™?¨3×/Ñ/Ùô —H’H˜T×0Ñ0°$Ó7ˆEÞÜ&Ð';×'BÑ'BÀ4Ó'HÓIÐIØ—+‘+˜a“.×&Ñ&Ó(ˆCØ—K‘K “NˆEð Ð'Ó'Ø—‘×#Ñ# GÔ,Ø# R˜.�Ø˜&“=ð '+§o¡o°eÓ&<�G˜F“Oà)-×):Ñ):¸5Ó)A�G˜IÓ&à˜Ó&¨5¯;©;«=¸FÓ+Bð *.�˜Ñ! #Ô&ð ×#Ñ# C×(Ñ(¨U¯^©^¸C×-@Ñ-@Ø! ! B˜K�Eð
 ÐKÓKØ hÑ/Ó/Ø Ñ)¨#Ñ.×5Ñ5°e×<à27°˜ Ñ)¨#Ô.Ø¨Ñ 1Ö1Ø-2˜HÑ% cÔ*ñ_ ðb 	�‰×Ñ˜GÕ$r$   c                 ój  • U R                  US9nSU;  a  XS'   UR                  SS5      S;   n[        UR                  SS5      5      nU(       aQ  UR                  S5      U::  a<  US	   R	                  5       nU R                  XU5      nXS'   U R                  XS
S
S9nU$ U R                  XSS
S9nU$ )a  
Return a dict (`SSHConfigDict`) of config options for a given hostname.

The host-matching rules of OpenSSH's ``ssh_config`` man page are used:
For each parameter, the first obtained value will be used.  The
configuration files contain sections separated by ``Host`` and/or
``Match`` specifications, and that section is only applied for hosts
which match the given patterns or keywords

Since the first obtained value for each parameter is used, more host-
specific declarations should be given near the beginning of the file,
and general defaults at the end.

The keys in the returned dict are all normalized to lowercase (look for
``"port"``, not ``"Port"``. The values are processed according to the
rules for substitution variable expansion in ``ssh_config``.

Finally, please see the docs for `SSHConfigDict` for deeper info on
features such as optional type conversion methods, e.g.::

    conf = my_config.lookup('myhost')
    assert conf['passwordauthentication'] == 'yes'
    assert conf.as_bool('passwordauthentication') is True

.. note::
    If there is no explicitly configured ``HostName`` value, it will be
    set to the being-looked-up hostname, which is as close as we can
    get to OpenSSH's behavior around that particular option.

:param str hostname: the hostname to lookup

.. versionchanged:: 2.5
    Returns `SSHConfigDict` objects instead of dict literals.
.. versionchanged:: 2.7
    Added canonicalization support.
.. versionchanged:: 2.7
    Added ``Match`` support.
.. versionchanged:: 3.3
    Added ``Match final`` support.
)r   r   ÚcanonicalizehostnameN)ÚyesÚalwaysÚcanonicalizemaxdotsr   Ú.ÚcanonicaldomainsT)Ú	canonicalÚfinalF)Ú_lookupÚgetÚintÚcountÚsplitÚcanonicalize)r    r   ÚoptionsÚcanonÚmaxdotsÚdomainss         r!   ÚlookupÚSSHConfig.lookup¶   sÛ   € ðT —,‘,¨�,Ð1ˆð ˜WÓ$Ø"*�JÑà—‘Ð2°DÓ9Ð=NÑNˆÜ�g—k‘kÐ"7¸Ó;Ó<ˆÞ�X—^‘^ CÓ(¨GÓ3ð Ð0Ñ1×7Ñ7Ó9ˆGØ×(Ñ(¨¸GÓDˆHà"*�JÑØ—l‘lØ¨T¸ð #ð ˆGð ˆð —l‘lØ¨U¸$ð #ð ˆGð ˆr$   Nc                 óÔ  ^^• Tc
  [        5       mU R                   H¯  nU R                  UR                  S/ 5      U5      (       d,  U R	                  UR                  S/ 5      UUUT5      (       d  MV  US   R                  5        HB  u  mnTT;  a  Ub  US S  OUTT'   M  TS:X  d  M#  TT   R                  UU4S jU 5       5        MD     M±     U(       a  U R                  TU5      mT$ )Nr7   r<   r8   r   c              3   ó<   >#   • U  H  oTT   ;  d  M  Uv •  M     g 7f©N© )Ú.0ÚxrP   rb   s     €€r!   Ú	<genexpr>Ú$SSHConfig._lookup.<locals>.<genexpr>  s   øé € ð (Ú#(˜a°W¸S±\Ñ,AŸ™¢5ùs   ƒ“	)ÚSSHConfigDictr   Ú_pattern_matchesr]   Ú_does_matchÚitemsÚextendÚ_expand_variables)r    r   rb   rZ   r[   rN   rQ   rP   s     `    @r!   r\   ÚSSHConfig._lookupø   sî   ù€ à‰?Ü#“oˆGð —|”|ˆGà×%Ñ% g§k¡k°&¸"Ó&=¸x×HÑHØ×#Ñ#Ø—K‘K 	¨2Ó.ØØØØ÷ñ ñ Ø% hÑ/×5Ñ5Ö7‘
��UØ˜gÓ%ð
 05Ñ/@ 5©¡8Àe�G˜C“LØ˜NÕ*Ø˜C‘L×'Ñ'õ (Ù#(ó(ö ó 8ñ $ö. ð ×,Ñ,¨W°hÓ?ˆGØˆr$   c                 ó   • SnU HJ  nSR                  X5      n[        Xb5      nUb  US   nO [        R                  " U5      nU(       d  MH  Us  $    UR                  SS5      S:X  a  U$ [        U5      e! [        R                   a     NHf = f)a/  
Return canonicalized version of ``hostname``.

:param str hostname: Target hostname.
:param options: An `SSHConfigDict` from a previous lookup pass.
:param domains: List of domains (e.g. ``["paramiko.org"]``).

:returns: A canonicalized hostname if one was found, else ``None``.

.. versionadded:: 2.7
Fz{}.{}r   ÚcanonicalizefallbacklocalrU   )rF   Ú_addressfamily_host_lookupÚsocketÚgethostbynameÚgaierrorr]   r   )r    r   rb   re   ÚfoundÚdomainÚ	candidateÚfamily_specifics           r!   ra   ÚSSHConfig.canonicalize  s¡   € ð ˆÛˆFØŸ™ xÓ8ˆIÜ8¸ÓLˆOØÑ*ð (¨Ñ*‘ðÜ"×0Ò0°Ó;�E÷ ˆuð !Ò ñ% ð, �;‰;Ð2°EÓ:¸eÓCØˆOô # 8Ó,Ð,øô —‘ó Ùðús   ®A6Á6BÂBc                 óh   • [        5       nU R                   H  nUR                  US   5        M     U$ )zo
Return the set of literal hostnames defined in the SSH config (both
explicit hostnames and wildcard entries).
r7   )Úsetr   Úupdate)r    ÚhostsÚentrys      r!   Úget_hostnamesÚSSHConfig.get_hostnamesD  s.   € ô
 “ˆØ—\”\ˆEØ�L‰L˜˜v™Ö'ñ "àˆr$   c                 ó
  • [        US5      (       a  UR                  S5      nSnU HX  nUR                  S5      (       a   [        R                  " X$SS  5      (       a    g[        R                  " X$5      (       d  MV  SnMZ     U$ )Nr`   Ú,FÚ!r   T)Úhasattrr`   rC   Úfnmatch)r    ÚpatternsÚtargetr;   Úpatterns        r!   rq   ÚSSHConfig._pattern_matchesN  sx   € ä�8˜W×%Ñ%Ø—~‘~ cÓ*ˆHØˆÛˆGà×!Ñ! #×&Ñ&¬7¯?ª?Ø  ˜÷,ñ ,ñ ô —’ ×1Ó1Ø’ñ  ð ˆr$   c                 ó  • / nUS S  n[         R                  " 5       nU(       Ga_  UR                  S5      n	S n
UR                  SS 5      nUR                  SS 5      nU	S   U	S   píUS:X  a  U R	                  X95      (       a  gUS:X  a  Un
OÄUS	:X  a  g
US:X  a  U=(       d    UnU R                  Xï5      n
OšUS:X  a  U R                  Xâ5      n
O‚US:X  a  U=(       d    UnU R                  UU5      n
O^US:X  a  U R                  Xè5      n
OFUS:X  a@  U R                  XRSU5      n[        c  [        e[        R                  " USS
S9R                  n
U
b  U R	                  X©5      (       a  gUR                  U	5        U(       a  GM_  U$ )Nr   r   ÚuserÚtypeÚparamrZ   Fr[   ÚallTr7   ÚoriginalhostÚ	localuserÚexecr   Ústdout)ÚhideÚwarn)ÚgetpassÚgetuserÚpopr]   Ú_should_failrq   Ú	_tokenizeÚinvokeÚinvoke_import_errorÚrunÚokrI   )r    Ú
match_listÚtarget_hostnamerZ   r[   rb   ÚmatchedÚ
candidatesÚlocal_usernamer   ÚpassedÚconfigured_hostÚconfigured_userÚtype_r•   Úhostvalr“   Úexec_cmds                     r!   rr   ÚSSHConfig._does_match_  sŠ  € ð ˆØ¡�]ˆ
Ü ŸšÓ*ˆßØ"Ÿ™ qÓ)ˆIØˆFð &Ÿk™k¨*°dÓ;ˆOØ%Ÿk™k¨&°$Ó7ˆOØ$ VÑ,¨i¸Ñ.@�5ð ˜Ó#Ø×$Ñ$ Y×:Ñ:Ø Ø˜ÓØ‘ð ˜%“Øð ˜&“Ø)×<¨_�Ø×.Ñ.¨uÓ>‘Ø˜.Ó(Ø×.Ñ.¨uÓF‘Ø˜&“Ø&×8¨.�Ø×.Ñ.¨u°dÓ;‘Ø˜+Ó%Ø×.Ñ.¨uÓE‘Ø˜&“ØŸ>™>Ø¨l¸Eó�ô
 ‘>Ü-Ð-äŸš H°8À$ÑG×JÑJ�àÑ! d×&7Ñ&7¸×&JÑ&JØà�N‰N˜9Ô%÷] ‰jð` ˆr$   c                 ó(   • US   (       a  U$ U(       + $ )NÚnegaterk   )r    Ú
would_passr   s      r!   r    ÚSSHConfig._should_fail—  s   € Ø& x×0ˆzÐD¸*´nÐDr$   c                 ó‚  • U R                  U5      nU(       d  U$ UnUS:w  a  UR                  SU5      nSU;   a  US   nO[        n[        R                  " 5       nSU;   a  US   n	OUn	[
        R                  " 5       R                  S5      S   n
[        X5      n[        R                  R                  S5      nX¢-   [        U5      -   U	-   n[        UR                  5       5      R                  5       UUU
UUUU	UUS.
nUnUR!                  5        H)  u  nnUU;  a  M  UR#                  U[%        U5      5      nM+     U$ )aL  
Tokenize a string based on current config/hostname data.

:param config: Current config data.
:param target_hostname: Original target connection hostname.
:param key: Config key being tokenized (used to filter token list).
:param value: Config value being tokenized.

:returns: The tokenized version of the input ``value`` string.
r   Úportr“   rX   r   r   )
r   r   r   r   r   r   r   r   r   r   )Ú_allowed_tokensr]   ÚSSH_PORTr�   rž   rz   Úgethostnamer`   ÚLazyFqdnÚosr-   Ú
expanduserÚreprr   ÚencodeÚ	hexdigestrs   ÚreplaceÚstr)r    r8   r§   rP   rQ   Úallowed_tokensÚconfigured_hostnamer·   r“   Ú
remoteuserÚlocal_hostnameÚ
local_fqdnÚhomedirÚtohashÚreplacementsÚ	tokenizedÚfindrÁ   s                     r!   r¡   ÚSSHConfig._tokenizeš  sL  € ð ×-Ñ-¨cÓ2ˆæØˆLð .ÐØ�*ÓØ"(§*¡*¨ZÐ9LÓ"MÐà�VÓØ˜&‘>‰DäˆDÜ�ŠÓ ˆØ�VÓØ ™‰JàˆJÜ×+Ò+Ó-×3Ñ3°CÓ8¸Ñ;ˆÜ˜fÓ5ˆ
Ü—'‘'×$Ñ$ SÓ)ˆØÑ1´D¸³JÑ>ÀÑKˆô
 �v—}‘}“Ó'×1Ñ1Ó3ØØ%à Øð "ØØàØñ!
ˆð& ˆ	Ø)×/Ñ/Ö1‰MˆD�'Ø˜>Ó)ÙØ!×)Ñ)¨$´°G³Ó=ŠIñ 2ð
 Ðr$   c                 ó:   • U R                   R                  U/ 5      $ )a  
Given config ``key``, return list of token strings to tokenize.

.. note::
    This feels like it wants to eventually go away, but is used to
    preserve as-strict-as-possible compatibility with OpenSSH, which
    for whatever reason only applies some tokens to some config keys.
)ÚTOKENS_BY_CONFIG_KEYr]   ©r    rP   s     r!   r¸   ÚSSHConfig._allowed_tokensÙ  s   € ð ×(Ñ(×,Ñ,¨S°"Ó5Ð5r$   c                 óä   • U Hi  nX   c  M
  [        U R                  XU5      n[        X   [        5      (       a%  [	        X   5       H  u  pVU" U5      X   U'   M     M]  U" X   5      X'   Mk     U$ )a  
Return a dict of config options with expanded substitutions
for a given original & current target hostname.

Please refer to :doc:`/api/config` for details.

:param dict config: the currently parsed config
:param str hostname: the hostname whose config is being looked up
)r   r¡   Ú
isinstanceÚlistÚ	enumerate)r    r8   r§   ÚkÚ	tokenizerÚirQ   s          r!   ru   ÚSSHConfig._expand_variablesä  st   € ó ˆAØ‰yÑ ÙÜ §¡°ÈÓKˆIÜ˜&™)¤T×*Ñ*Ü )¨&©)Ö 4‘H�AÙ#,¨UÓ#3�F‘I˜a“Ló !5ñ & f¡iÓ0�“	ñ ð ˆr$   c                 ó€   •  [         R                  " U5      $ ! [         a    [        SR	                  U5      5      ef = f)z.
Return a list of host_names from host value.
zUnparsable host {})Úshlexr`   Ú
ValueErrorr   rF   )r    r7   s     r!   rJ   ÚSSHConfig._get_hostsù  s?   € ð	FÜ—;’;˜tÓ$Ð$øÜó 	FÜ"Ð#7×#>Ñ#>¸tÓ#DÓEÐEð	Fús   ‚ ˜%=c                 óÎ  ^
• / n[         R                  " U5      nU(       a£  SSSS.nUR                  S5      nUR                  S5      (       a
  SUS'   USS nXAS	'   US
;   a  UR	                  U5        M[  U(       d  [        SR                  U5      5      eUR                  S5      US'   UR	                  U5        U(       a  M£  U Vs/ s H  oUS	   PM	     nnSU;   a‚  Sm
[        [        U
4S jU5      5      [        [        U
4S jU5      5      p‡Sn	[        U5      (       a  Sn	O,SU;   a&  UR                  S5      UR                  S5      :”  a  Sn	U	b  [        U	5      eU$ s  snf )zw
Parse a specific Match config line into a list-of-dicts for its values.

Performs some parse-time validation as well.
NF)r”   r•   r³   r   r‹   Tr³   r   r”   )r–   rZ   r[   z'Missing parameter to Match '{}' keywordr•   r–   )r–   rZ   c                 ó   >• U T;   $ rj   rk   ©rm   Ú	allowables    €r!   Ú<lambda>Ú(SSHConfig._get_matches.<locals>.<lambda>"  s	   ø€  a¨9¢nr$   c                 ó   >• U T;  $ rj   rk   rà   s    €r!   râ   rã   #  s
   ø€  a¨yÒ&8r$   z>Match does not allow 'all' mixed with anything but 'canonical'rZ   z-Match does not allow 'all' before 'canonical')rÛ   r`   rŸ   rC   rI   r   rF   rÔ   ÚfilterÚanyÚindex)r    r;   r<   Útokensr®   rm   Úkeywordsr¥   ÚbadÚerrrá   s             @r!   rK   ÚSSHConfig._get_matches  sZ  ø€ ð ˆÜ—’˜UÓ#ˆÞØ!¨D¸EÑBˆEØ—J‘J˜q“MˆEà×Ñ ×$Ñ$Ø"&��h‘Ø˜a˜b˜	�Ø!�&‰MàÐ5Ó5Ø—‘˜uÔ%ÙÞÜ&Ø=×DÑDÀUÓKóð ð $ŸZ™Z¨›]ˆE�'‰NØ�N‰N˜5Ô!÷# ˆfñ( (/Ó/¢w !�f”I¡wˆÐ/Ø�HÓØ,ˆIä”VÔ4°hÓ?Ó@Ü”VÔ8¸(ÓCÓDð ð ˆCÜ�3�x‰xØV‘Ø Ó" r§x¡x°Ó'<¸r¿x¹xÈ»Ó'NØE�Ø‰Ü& sÓ+Ð+Øˆùò 0s   ÃE"r   )NFF)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__rD   ÚcompilerE   rÏ   r"   Úclassmethodr)   r/   r&   r2   rf   r\   ra   r‡   rq   rr   r    r¡   r¸   ru   rJ   rK   Ú__static_attributes__rk   r$   r!   r   r   -   sÅ   † ñð —Z’ZÐ ;Ó<€Nò
 HØ�FÚAÚ/Ú'ò Mñ	Ðòð* ñ-ó ð-ð ñ&ó ð&ð ñó ðò:%òx@ôD!òF'-òRòò"6òpEò=ò~	6òò*Fõ*r$   r   c                 ó\  • UR                  SS5      R                  5       nUS:X  a  g [        R                  nUS:X  a  [        R                  n[        R
                  " U SU[        R                  [        R                  [        R                  5      $ ! [        R                   a     gf = f)aÑ  
Try looking up ``hostname`` in an IPv4 or IPv6 specific manner.

This is an odd duck due to needing use in two divergent use cases. It looks
up ``AddressFamily`` in ``options`` and if it is ``inet`` or ``inet6``,
this function uses `socket.getaddrinfo` to perform a family-specific
lookup, returning the result if successful.

In any other situation -- lookup failure, or ``AddressFamily`` being
unspecified or ``any`` -- ``None`` is returned instead and the caller is
expected to do something situation-appropriate like calling
`socket.gethostbyname`.

:param str hostname: Hostname to look up.
:param options: `SSHConfigDict` instance w/ parsed options.
:returns: ``getaddrinfo``-style tuples, or ``None``, depending.
Úaddressfamilyræ   NÚinet)
r]   rH   rz   ÚAF_INET6ÚAF_INETÚgetaddrinfoÚ
SOCK_DGRAMÚ
IPPROTO_IPÚAI_CANONNAMEr|   )r   rb   Úaddress_familyÚfamilys       r!   ry   ry   /  s–   € ð$ —[‘[ °%Ó8×>Ñ>Ó@€NØ˜ÓØðÜ—‘ˆØ˜VÓ#Ü—^‘^ˆFÜ×!Ò!ØØØÜ×ÑÜ×ÑÜ×Ñó
ð 	
øô �?‰?ó Ùðús   ©A*B ÂB+Â*B+c                   ó(   • \ rS rSrSrSS jrS rSrg)r»   iT  z/
Returns the host's fqdn on request as string.
Nc                 ó*   • S U l         Xl        X l        g rj   )Úfqdnr8   r7   )r    r8   r7   s      r!   r"   ÚLazyFqdn.__init__Y  s   € ØˆŒ	ØŒØ�	r$   c                 óþ   • U R                   ce  S n[        U R                  U R                  5      nUb"  U H  nUu  pEpgnU(       d  M  SU;   d  M  Un  O   Uc  [        R
                  " 5       nXl         U R                   $ )NrX   )r  ry   r7   r8   rz   Úgetfqdn)	r    r  ÚresultsÚresÚafÚsocktypeÚprotoÚ	canonnameÚsas	            r!   Ú__str__ÚLazyFqdn.__str__^  sy   € Ø�9‰9Ñð ˆDÜ0°·±¸D¿K¹KÓHˆGØÑ"Û"�CØ9<Ñ6�B %°Bß �y S¨IÕ%5Ø(˜Ùñ	 #ð ‰|Ü—~’~Ó'�àŒIØ�y‰yÐr$   )r8   r  r7   rj   )rí   rî   rï   rð   rñ   r"   r  rô   rk   r$   r!   r»   r»   T  s   † ñôõ
r$   r»   c                   ó$   • \ rS rSrSrS rS rSrg)rp   iz  ac  
A dictionary wrapper/subclass for per-host configuration structures.

This class introduces some usage niceties for consumers of `SSHConfig`,
specifically around the issue of variable type conversions: normal value
access yields strings, but there are now methods such as `as_bool` and
`as_int` that yield casted values instead.

For example, given the following ``ssh_config`` file snippet::

    Host foo.example.com
        PasswordAuthentication no
        Compression yes
        ServerAliveInterval 60

the following code highlights how you can access the raw strings as well as
usefully Python type-casted versions (recalling that keys are all
normalized to lowercase first)::

    my_config = SSHConfig()
    my_config.parse(open('~/.ssh/config'))
    conf = my_config.lookup('foo.example.com')

    assert conf['passwordauthentication'] == 'no'
    assert conf.as_bool('passwordauthentication') is False
    assert conf['compression'] == 'yes'
    assert conf.as_bool('compression') is True
    assert conf['serveraliveinterval'] == '60'
    assert conf.as_int('serveraliveinterval') == 60

.. versionadded:: 2.5
c                 ó^   • X   n[        U[        5      (       a  U$ UR                  5       S:H  $ )ar  
Express given key's value as a boolean type.

Typically, this is used for ``ssh_config``'s pseudo-boolean values
which are either ``"yes"`` or ``"no"``. In such cases, ``"yes"`` yields
``True`` and any other value becomes ``False``.

.. note::
    If (for whatever reason) the stored value is already boolean in
    nature, it's simply returned.

.. versionadded:: 2.5
rU   )rÓ   ÚboolrH   )r    rP   Úvals      r!   Úas_boolÚSSHConfigDict.as_boolœ  s.   € ð ‰iˆÜ�cœ4× Ñ ØˆJØ�y‰y‹{˜eÑ#Ð#r$   c                 ó   • [        X   5      $ )zÅ
Express given key's value as an integer, if possible.

This method will raise ``ValueError`` or similar if the value is not
int-appropriate, same as the builtin `int` type.

.. versionadded:: 2.5
)r^   rÐ   s     r!   Úas_intÚSSHConfigDict.as_int¯  s   € ô �4‘9‹~Ðr$   rk   N)rí   rî   rï   rð   rñ   r  r  rô   rk   r$   r!   rp   rp   z  s   † ñòB$õ&	r$   rp   )rñ   r�   r�   r¼   rD   rÛ   rz   Ú	functoolsr   Úhashlibr   Úior   r¢   r£   ÚImportErrorÚeÚssh_exceptionr   r   r¹   r   ry   r»   Údictrp   rk   r$   r!   Ú<module>r     sˆ   ðñ(ó Û Û 	Û 	Û Û Ý Ý Ý à(Ñ €ÐðÛ÷ Bà€÷ñ òD"÷J#ñ #ôL>�Dõ >øðk ó ØÕûðús   ³A$ Á$A6Á*A1Á1A6