Files
ServerSync/lib/paramiko/__pycache__/config.cpython-314.pyc

266 lines
23 KiB
Plaintext
Raw Normal View History

2026-02-12 02:28:23 +02:00
+
u<10>i<EFBFBD>j<00><00><><00>Rt^RIt^RIt^RIt^RIt^RIt^RIt^RIHt^RI H
t
^RI H t RRut t^RI t ^RIHtHt^t!RR4tRt!R R
4t!R R ]4tR# ]d t]tRtAL<RtAii;i) z2
Configuration file (aka ``ssh_config``) support.
N)<01>sha1)<01>StringIO)<01>partial)<02>CouldNotCanonicalize<7A>ConfigParseErrorc <00>a<00>]tRt^.toRt]P !R4tR.RORR.R.ROR.ROR.R OR .R!O/tR
t ]
R 4t ]
R 4t ]
R 4t RtRtR"RltRtRtRtRtRtRtRtRtRtRtRtVtR#)#<23> SSHConfigag
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+)(.+)<29> controlpath<74>%h<>hostname<6D> identityfile<6C> proxycommand<6E> proxyjump<6D>
match-execc <0C><00>.VnR#)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<EFBFBD><01>_config)<01>selfs&<26>6/tmp/pip-target-zhdecbcm/lib/python/paramiko/config.py<70>__init__<5F>SSHConfig.__init__Hs <00><00>&<1A><04> <0C>c <0C>6<00>VP\V44#)zO
Create a new, parsed `SSHConfig` from ``text`` string.
.. versionadded:: 2.7
)<02> from_filer)<02>cls<6C>texts&&r<00> from_text<78>SSHConfig.from_text]s<00><00><13>}<7D>}<7D>X<EFBFBD>d<EFBFBD>^<5E>,<2C>,rc <0C><><00>\V4;_uu_4pVPV4uuRRR4# +'giR#;i)zZ
Create a new, parsed `SSHConfig` from the file found at ``path``.
.. versionadded:: 2.7
N)<02>openr)r<00>path<74>flos&& r<00> from_path<74>SSHConfig.from_pathfs'<00><00><12>$<24>Z<EFBFBD>Z<EFBFBD>3<EFBFBD><16>=<3D>=<3D><13>%<25><18>Z<EFBFBD>Z<EFBFBD>Z<EFBFBD>s <00>0<05> A c <0C>6<00>V!4pVPV4V#)zX
Create a new, parsed `SSHConfig` from file-like object ``flo``.
.. versionadded:: 2.7
)<01>parse)rr!<00>objs&& rr<00>SSHConfig.from_fileps<00><00><12>e<EFBFBD><03> <0B> <09> <09>#<23><0E><12>
rc <0C><><00>RR.R//pVEF<>pVP4pV'dVPR4'dK5\P!VPV4pV'g\ RP V44hVP^4P4pVP^4pVR 9dTVPPV4R//pVR8XdVPV4VR&K<>VPV4VR&EKVR8Xd%VP4R8XdR VR,V&EK-VPR
4'dVPR
4'dV^R pVR 9d@WRR,9d#VR,V,PV4EK<>V.VR,V&EK<>WRR,9gEK<>WbR,V&EK<> VPPV4R #)zv
Read an OpenSSH config from the given file object.
:param file_obj: a file-like object to read the config file from
<EFBFBD>host<73>*<2A>config<69>#zUnparsable line {}<7D>matchesr <00>noneN<65>")r)<00>match<63><68><EFBFBD><EFBFBD><EFBFBD>)r <00> localforward<72> remoteforward)<0E>strip<69>
startswith<EFBFBD>rer0<00>SETTINGS_REGEXr<00>format<61>group<75>lowerr<00>append<6E>
_get_hosts<EFBFBD> _get_matches<65>endswith)r<00>file_obj<62>context<78>liner0<00>key<65>values&& rr%<00>SSHConfig.parse{s<><00><00><1A>C<EFBFBD>5<EFBFBD>(<28>B<EFBFBD>/<2F><07><1C>D<EFBFBD><18>:<3A>:<3A><<3C>D<EFBFBD><17>4<EFBFBD>?<3F>?<3F>3<EFBFBD>/<2F>/<2F><18><17>H<EFBFBD>H<EFBFBD>T<EFBFBD>0<>0<>$<24>7<>E<EFBFBD><18>&<26>';<3B>'B<>'B<>4<EFBFBD>'H<>I<>I<><17>+<2B>+<2B>a<EFBFBD>.<2E>&<26>&<26>(<28>C<EFBFBD><19>K<EFBFBD>K<EFBFBD><01>N<EFBFBD>E<EFBFBD><13>'<27>'<27><14> <0C> <0C>#<23>#<23>G<EFBFBD>,<2C>#<23>R<EFBFBD>.<2E><07><16>&<26>=<3D> '+<2B>o<EFBFBD>o<EFBFBD>e<EFBFBD>&<<3C>G<EFBFBD>F<EFBFBD>O<EFBFBD>)-<2D>):<3A>):<3A>5<EFBFBD>)A<>G<EFBFBD>I<EFBFBD>&<26><14><0E>&<26>5<EFBFBD>;<3B>;<3B>=<3D>F<EFBFBD>+B<>*.<2E><07><08>!<21>#<23>&<26><19>#<23>#<23>C<EFBFBD>(<28>(<28>U<EFBFBD>^<5E>^<5E>C<EFBFBD>-@<40>-@<40>!<21>!<21>B<EFBFBD>K<EFBFBD>E<EFBFBD>
<17>K<>K<><1A>h<EFBFBD>/<2F>/<2F><1F><08>)<29>#<23>.<2E>5<>5<>e<EFBFBD><<3C>27<32><17><07><08>)<29>#<23>.<2E><18><08> 1<>1<>-2<>H<EFBFBD>%<25>c<EFBFBD>*<2A>_<1D>b <0A> <0C> <0C><1B><1B>G<EFBFBD>$rc <0C><><00>VPVR7pRV9dWR&VPRR4R 9p\VPR^44pV'dZVPR4V8:dDVR,P 4pVP WV4pWR&VPWRRR 7pV#VPWR
RR 7pV#) 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 <00>canonicalizehostnameN<65>canonicalizemaxdots<74>.<2E>canonicaldomainsT)<02> canonical<61>finalF)<02>yes<65>always)<06>_lookup<75>get<65>int<6E>count<6E>split<69> canonicalize)rr <00>options<6E>canon<6F>maxdots<74>domainss&& r<00>lookup<75>SSHConfig.lookup<75>s<><00><00>T<17>,<2C>,<2C><08>,<2C>1<><07> <16>W<EFBFBD> $<24>"*<2A>J<EFBFBD> <1F><17> <0B> <0B>2<>D<EFBFBD>9<>=N<>N<><05><15>g<EFBFBD>k<EFBFBD>k<EFBFBD>"7<><11>;<3B><<3C><07> <10>X<EFBFBD>^<5E>^<5E>C<EFBFBD>(<28>G<EFBFBD>3<><1E>0<>1<>7<>7<>9<>G<EFBFBD><1B>(<28>(<28><18>G<EFBFBD>D<>H<EFBFBD>"*<2A>J<EFBFBD> <1F><1A>l<EFBFBD>l<EFBFBD><18>T<EFBFBD><14>#<23><0E>G<EFBFBD><17><0E><1B>l<EFBFBD>l<EFBFBD><18>U<EFBFBD>$<24>#<23><0E>G<EFBFBD><17>rNc<08><>aa<07>Sf \4oVPF<>pVPVPR.4V4'g.VP VPR.4VVVS4'gKXVR,P 4FMwopSS9dVe
VR,MTSS&K!SR8XgK*SS,P VV3RlV44KO K<> V'dVPSV4oS#)Nr)r-r+<00>NNNr c3<00>F<"<00>TFqSS,9gKVx<00>K R#5i<01>N<>)<04>.0<EFBFBD>xrBrTs& <20><>r<00> <genexpr><3E>$SSHConfig._lookup.<locals>.<genexpr>s<00><><00><00>(<16>#(<28>a<EFBFBD>W<EFBFBD>S<EFBFBD>\<5C>,A<><01><01>5<EFBFBD>s<00>!<01>
!)<08> SSHConfigDictr<00>_pattern_matchesrO<00> _does_match<63>items<6D>extend<6E>_expand_variables)rr rTrJrKr@rCrBs&&f&& @rrN<00>SSHConfig._lookup<75>s<><00><><00> <12>?<3F>#<23>o<EFBFBD>G<EFBFBD><1C>|<7C>|<7C>G<EFBFBD><14>%<25>%<25>g<EFBFBD>k<EFBFBD>k<EFBFBD>&<26>"<22>&=<3D>x<EFBFBD>H<>H<><17>#<23>#<23><1B>K<EFBFBD>K<EFBFBD> <09>2<EFBFBD>.<2E><1C><1D><19><1B> <12><12><19>%<25>h<EFBFBD>/<2F>5<>5<>7<>
<EFBFBD><03>U<EFBFBD><16>g<EFBFBD>%<25>
05<30>/@<40>5<EFBFBD><11>8<EFBFBD>e<EFBFBD>G<EFBFBD>C<EFBFBD>L<EFBFBD><18>N<EFBFBD>*<2A><1B>C<EFBFBD>L<EFBFBD>'<27>'<27>(<16>#(<28>(<16><16>8<>$<24>. <11><1B>,<2C>,<2C>W<EFBFBD>h<EFBFBD>?<3F>G<EFBFBD><16>rc <0C>0<00>RpVFPpRPW4p\Wb4pVe V^,pM\P!V4pV'gKNVu# VP RR4R8XdV#\ V4h \PdLKi;i)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{}.{}<7D>canonicalizefallbacklocalrL)r8<00>_addressfamily_host_lookup<75>socket<65> gethostbyname<6D>gaierrorrOr)rr rTrW<00>found<6E>domain<69> candidate<74>family_specifics&&&& rrS<00>SSHConfig.canonicalizes<><00><00><16><05><1D>F<EFBFBD><1F><0E><0E>x<EFBFBD>8<>I<EFBFBD>8<><19>L<>O<EFBFBD><1E>*<2A>(<28><01>*<2A><05><19>"<22>0<>0<><19>;<3B>E<EFBFBD><15>u<EFBFBD>!<21> <20>%<1E>, <13>;<3B>;<3B>2<>E<EFBFBD> :<3A>e<EFBFBD> C<><1B>O<EFBFBD>#<23>8<EFBFBD>,<2C>,<2C><><1E><EFBFBD><EFBFBD><19><18><19>s<00>A=<02>=B<05>Bc <0C>p<00>\4pVPFpVPVR,4K V#)zo
Return the set of literal hostnames defined in the SSH config (both
explicit hostnames and wildcard entries).
r))<03>setr<00>update)r<00>hosts<74>entrys& r<00> get_hostnames<65>SSHConfig.get_hostnamesEs.<00><00>
<14><05><05><19>\<5C>\<5C>E<EFBFBD> <11>L<EFBFBD>L<EFBFBD><15>v<EFBFBD><1D> '<27>"<22><14> rc<08><00>\VR4'dVPR4pRpVF`pVPR4'd'\P!W$R,4'dR#\P!W$4'gK^RpKb V#)rR<00>,F<>!<21><>NNT)<04>hasattrrRr5<00>fnmatch)r<00>patterns<6E>targetr0<00>patterns&&& rrd<00>SSHConfig._pattern_matchesOsv<00><00> <12>8<EFBFBD>W<EFBFBD> %<25> %<25><1F>~<7E>~<7E>c<EFBFBD>*<2A>H<EFBFBD><15><05><1F>G<EFBFBD><16>!<21>!<21>#<23>&<26>&<26>7<EFBFBD>?<3F>?<3F><16><02> <0B>,<0E>,<0E><1D><19><1F><1F><16>1<>1<><1C><05> <20><15> rc<08>@<00>.pVR,p\P!4pV'EduVP^4p Rp
VPRR4p VPRR4p V R,V R,r<>V R8XdVP W94'dR#V R8XdTp
M<EFBFBD>V R 8XdR
#V R 8XdT ;'gTpVP W<>4p
M<EFBFBD>V R 8XdVP W<>4p
M<EFBFBD>V R8Xd T ;'gTpVP VV4p
MdV R 8XdVP W<>4p
MKV R8XdEVP WRRV4p\f\h\P!VRR
R7Pp
V
eVP W<>4'dR#VPV 4EK}V#)r[Nr <00>user<65>type<70>paramrJFrK<00>allTr)<00> originalhost<73> localuser<65>execr<00>stdout)<02>hide<64>warn) <0C>getpass<73>getuser<65>poprO<00> _should_failrd<00> _tokenize<7A>invoke<6B>invoke_import_error<6F>run<75>okr;)r<00>
match_list<EFBFBD>target_hostnamerJrKrT<00>matched<65>
candidates<EFBFBD>local_usernamerr<00>passed<65>configured_host<73>configured_user<65>type_r<5F><00>hostvalr<6C><00>exec_cmds&&&&&& rre<00>SSHConfig._does_match`s<><00><00><15><07><1F><01>]<5D>
<EFBFBD> <20><1F><1F>*<2A><0E><18>j<EFBFBD>"<22><0E><0E>q<EFBFBD>)<29>I<EFBFBD><19>F<EFBFBD>&<26>k<EFBFBD>k<EFBFBD>*<2A>d<EFBFBD>;<3B>O<EFBFBD>%<25>k<EFBFBD>k<EFBFBD>&<26>$<24>7<>O<EFBFBD>$<24>V<EFBFBD>,<2C>i<EFBFBD><07>.@<40>5<EFBFBD><15> <0B>#<23><17>$<24>$<24>Y<EFBFBD>:<3A>:<3A> <20><14><07><1F><1E><06><17>%<25><1E><1B><17>&<26><1F>)<29><<3C><<3C>_<EFBFBD><07><1D>.<2E>.<2E>u<EFBFBD>><3E><06><16>.<2E>(<28><1D>.<2E>.<2E>u<EFBFBD>F<><06><16>&<26><1F>&<26>8<>8<>.<2E><04><1D>.<2E>.<2E>u<EFBFBD>d<EFBFBD>;<3B><06><16>+<2B>%<25><1D>.<2E>.<2E>u<EFBFBD>E<><06><16>&<26><1F><1F>><3E>><3E><1B>l<EFBFBD>E<EFBFBD><12><08>
<1A>><3E>-<2D>-<2D><1F><1A><1A>H<EFBFBD>8<EFBFBD>$<24>G<>J<>J<><06><15>!<21>d<EFBFBD>&7<>&7<><06>&J<>&J<><1C> <13>N<EFBFBD>N<EFBFBD>9<EFBFBD> %<25><16>rc<08>2<00>VR,'dV#V'*#)<01>negater^)r<00>
would_passrrs&&&rr<><00>SSHConfig._should_fail<69>s<00><00>&<26>x<EFBFBD>0<>0<>z<EFBFBD>D<>*<2A>n<EFBFBD>Drc <0C><><00>VPV4pV'gV#TpVR8wdVPRV4pRV9d VR,pM\p\P!4pRV9d VR,p MTp \
P !4PR4^,p
\W4p \PPR4p W<>,\V4,V ,p R\V P44P4RV RVR V
R
V R VR VR V RVRV /
pTpVP!4F*wppVV9dKVP#V\%V44pK, V#)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 <00>portr<74>rH<00>~<7E>%C<>%dr
<00>%L<>%l<>%n<>%p<>%r<>%u)<13>_allowed_tokensrO<00>SSH_PORTr<54>r<>rm<00> gethostnamerR<00>LazyFqdn<64>osr <00>
expanduser<EFBFBD>reprr<00>encode<64> hexdigestrf<00>replace<63>str)rr+r<>rBrC<00>allowed_tokens<6E>configured_hostnamer<65>r<><00>
remoteuser<EFBFBD>local_hostname<6D>
local_fqdn<EFBFBD>homedir<69>tohash<73> replacements<74> tokenized<65>findr<64>s&&&&& rr<><00>SSHConfig._tokenize<7A>sa<00><00><1E>-<2D>-<2D>c<EFBFBD>2<><0E><1D><18>L<EFBFBD>.<2E><1B> <0E>*<2A> <1C>"(<28>*<2A>*<2A>Z<EFBFBD>9L<39>"M<> <1F> <11>V<EFBFBD> <1B><19>&<26>><3E>D<EFBFBD><1B>D<EFBFBD><16><EFBFBD><EFBFBD> <20><04> <11>V<EFBFBD> <1B><1F><06><1E>J<EFBFBD><1D>J<EFBFBD><1F>+<2B>+<2B>-<2D>3<>3<>C<EFBFBD>8<><11>;<3B><0E><1D>f<EFBFBD>5<>
<EFBFBD><14>'<27>'<27>$<24>$<24>S<EFBFBD>)<29><07><1F>1<>D<EFBFBD><14>J<EFBFBD>><3E><1A>K<><06> <11>$<24>v<EFBFBD>}<7D>}<7D><EFBFBD>'<27>1<>1<>3<> <10>'<27> <10>%<25> <10>.<2E> <10>*<2A> <11>/<2F> <10>$<24> <10>*<2A> <10>$<24> <0F><17>
<EFBFBD> <0C>$<1A> <09>)<29>/<2F>/<2F>1<>M<EFBFBD>D<EFBFBD>'<27><13>><3E>)<29><18>!<21>)<29>)<29>$<24><03>G<EFBFBD> <0C>=<3D>I<EFBFBD>2<>
<19>rc <0C>:<00>VPPV.4#)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.
)<02>TOKENS_BY_CONFIG_KEYrO<00>rrBs&&rr<><00>SSHConfig._allowed_tokens<6E>s<00><00><14>(<28>(<28>,<2C>,<2C>S<EFBFBD>"<22>5<>5rc <0C><00>VFpW,fK\VPWV4p\W,\4'd.\ W,4FwrVV!V4W,V&K KoV!W,4W&K<> V#)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
)rr<><00>
isinstance<EFBFBD>list<73> enumerate)rr+r<><00>k<> tokenizer<65>irCs&&& rrh<00>SSHConfig._expand_variables<65>st<00><00><18>A<EFBFBD><15>y<EFBFBD> <20><18><1F><04><0E><0E><06><11>K<>I<EFBFBD><19>&<26>)<29>T<EFBFBD>*<2A>*<2A> )<29>&<26>)<29> 4<>H<EFBFBD>A<EFBFBD>#,<2C>U<EFBFBD>#3<>F<EFBFBD>I<EFBFBD>a<EFBFBD>L<EFBFBD>!5<>&<26>f<EFBFBD>i<EFBFBD>0<><06> <09><18><16> rc <0C><><00>\P!V4# \d\RP T44hi;i)z.
Return a list of host_names from host value.
zUnparsable host {})<05>shlexrR<00>
ValueErrorrr8)rr)s&&rr<<00>SSHConfig._get_hosts<74>s?<00><00> F<01><18>;<3B>;<3B>t<EFBFBD>$<24> $<24><><19> F<01>"<22>#7<>#><3E>#><3E>t<EFBFBD>#D<>E<> E<> F<01>s<00><00>&>c <0C><>a
<EFBFBD>.p\P!V4pV'd<>RRRRRR/pVP^4pVPR4'dRVR&VR,pWAR&VR9dVP V4KdV'g\ R P V44hVP^4VR&VP V4K<>VUu.uF qUR,NK ppR V9d<>Ro
\\V
3R lV44\\V
3R lV44r<>Rp \V4'dRp M.R
V9d(VPR
4VPR 48<>dRp V e \ V 4hV#uupi)zw
Parse a specific Match config line into a list-of-dicts for its values.
Performs some parse-time validation as well.
r<EFBFBD>Nr<4E>r<>Fr~Trr<>rJz'Missing parameter to Match '{}' keywordc<00><<01>VS9#r]r^<00>r`<00> allowables&<26>r<00><lambda><3E>(SSHConfig._get_matches.<locals>.<lambda>"s <00><><00>a<EFBFBD>9<EFBFBD>nrc<00><<01>VS9#r]r^r<>s&<26>rr<>r<>#s
<00><><00>a<EFBFBD>y<EFBFBD>&8rz>Match does not allow 'all' mixed with anything but 'canonical'z-Match does not allow 'all' before 'canonical')r<>rJrK)r<>rJ) r<>rRr<>r5r;rr8r<><00>filter<65>any<6E>index) rr0r-<00>tokensr<73>r`<00>keywordsr<73><00>bad<61>errr<72>s && @rr=<00>SSHConfig._get_matchessY<00><><00> <15><07><16><1B><1B>U<EFBFBD>#<23><06><14><1B>T<EFBFBD>7<EFBFBD>D<EFBFBD>(<28>E<EFBFBD>B<>E<EFBFBD><1A>J<EFBFBD>J<EFBFBD>q<EFBFBD>M<EFBFBD>E<EFBFBD><14><1F><1F><03>$<24>$<24>"&<26><05>h<EFBFBD><0F><1D>b<EFBFBD> <09><05>!<21>&<26>M<EFBFBD><14>5<>5<><17><0E><0E>u<EFBFBD>%<25><18><19>&<26>=<3D>D<>D<>U<EFBFBD>K<><12><12>$<24>Z<EFBFBD>Z<EFBFBD><01>]<5D>E<EFBFBD>'<27>N<EFBFBD> <13>N<EFBFBD>N<EFBFBD>5<EFBFBD> !<21>(/<2F>/<2F>w<EFBFBD>!<21>f<EFBFBD>I<EFBFBD>I<EFBFBD>w<EFBFBD><08>/<2F> <10>H<EFBFBD> <1C>,<2C>I<EFBFBD><14>V<EFBFBD>4<>h<EFBFBD>?<3F>@<40><14>V<EFBFBD>8<>(<28>C<>D<><14><17>C<EFBFBD><12>3<EFBFBD>x<EFBFBD>x<EFBFBD>V<><03><1C><02>"<22>r<EFBFBD>x<EFBFBD>x<EFBFBD> <0B>'<<3C>r<EFBFBD>x<EFBFBD>x<EFBFBD><05><EFBFBD>'N<>E<><03><12><EFBFBD>&<26>s<EFBFBD>+<2B>+<2B><16><0E><>0s<00> E-r)r<>r
r<>r<>r<>r<>r<>r<>)r<>r<>r<>r
r<>r<>r<>)r<>r
r<>r<>)r
r<>r<>) r<>r<>r
r<>r<>r<>r<>r<>r<>)NFF)<1D>__name__<5F>
__module__<EFBFBD> __qualname__<5F>__firstlineno__<5F>__doc__r6<00>compiler7r<>r<00> classmethodrr"rr%rXrNrSrzrdrer<>r<>r<>rhr<r=<00>__static_attributes__<5F>__classdictcell__<5F><01> __classdict__s@rrr.s<><00><><00><00><08><18>Z<EFBFBD>Z<EFBFBD> ;<3B><<3C>N<EFBFBD>
<16>G<><12>T<EFBFBD>F<EFBFBD><16>A<><16>/<2F><13>'<27> <15>L<> <06><18><1A>*<11>-<2D><11>-<2D><11>&<26><11>&<26><11><13><11><13>:%<25>x@<17>D!<17>F'-<2D>R<15><15>"6<17>pE<01><<19>| 6<><16>*F<01>*<17>*rrc<04>f<00>VPRR4P4pVR8XdR#\PpVR8Xd\Pp\P
!VRV\P \P\P4# \PdR#i;i)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.
<EFBFBD> addressfamilyr<79>N<>inet)
rOr:rm<00>AF_INET6<54>AF_INET<45> getaddrinfo<66>
SOCK_DGRAM<EFBFBD>
IPPROTO_IP<EFBFBD> AI_CANONNAMEro)r rT<00>address_family<6C>familys&& rrlrl/s<><00><00>$<1D>[<5B>[<5B><1F>%<25>8<>><3E>><3E>@<40>N<EFBFBD><15><15><1E><0E>  <0A><17><1F><1F><06> <19>V<EFBFBD> #<23><1B>^<5E>^<5E>F<EFBFBD><15>!<21>!<21> <14> <10> <12> <12> <1D> <1D> <12> <1D> <1D> <12> <1F> <1F> 
<EFBFBD>
<EFBFBD><EFBFBD> <12>?<3F>?<3F> <0A> <0C> <0A>s<00>A+B<00>B0<03>/B0c<00>4a<00>]tRtRtoRtRRltRtRtVtR#)r<>iTz/
Returns the host's fqdn on request as string.
Nc<08>,<00>RVnWnW nR#r])<03>fqdnr+r))rr+r)s&&&rr<00>LazyFqdn.__init__Ys<00><00><18><04> <09><1C> <0B><18> rc<08><00>VPfjRp\VPVP4pVe%VFpVwrErgpV'gKRV9gKTpM Vf\P
!4pWnVP#)NrH)rrlr)r+rm<00>getfqdn) rr<00>results<74>res<65>af<61>socktype<70>proto<74> canonname<6D>sas & r<00>__str__<5F>LazyFqdn.__str__^sy<00><00> <0F>9<EFBFBD>9<EFBFBD> <1C><18>D<EFBFBD>0<><14><19><19>D<EFBFBD>K<EFBFBD>K<EFBFBD>H<>G<EFBFBD><16>"<22>"<22>C<EFBFBD>9<<3C>6<>B<EFBFBD>%<25>B<EFBFBD> <20>y<EFBFBD>S<EFBFBD>I<EFBFBD>%5<>(<28><04><1D> #<23> <14>|<7C><1D>~<7E>~<7E>'<27><04><1C>I<EFBFBD><13>y<EFBFBD>y<EFBFBD>r)r+rr)r]) r<>r<>r<>r<>r<>rrr<>r<>r<>s@rr<>r<>Ts<00><><00><00><08><19>
<19>rr<>c<00>0a<00>]tRtRtoRtRtRtRtVtR#)rcizac
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 <0C>h<00>W,p\V\4'dV#VP4R8H#)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
rL)r<><00>boolr:)rrB<00>vals&& r<00>as_bool<6F>SSHConfigDict.as_bool<6F>s.<00><00><13>i<EFBFBD><03> <15>c<EFBFBD>4<EFBFBD> <20> <20><16>J<EFBFBD><12>y<EFBFBD>y<EFBFBD>{<7B>e<EFBFBD>#<23>#rc <0C>$<00>\W,4#)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
)rPr<>s&&r<00>as_int<6E>SSHConfigDict.as_int<6E>s<00><00><13>4<EFBFBD>9<EFBFBD>~<7E>rr^N) r<>r<>r<>r<>r<>rrr<>r<>r<>s@rrcrczs<00><><00><00><08>B$<24>& <1E> rrc)r<>r<>r<>r<>r6r<>rm<00>hashlibr<00>ior<00> functoolsrr<>r<><00> ImportError<6F>e<> ssh_exceptionrrr<>rrlr<><00>dictrcr^rr<00><module>r s<><00><01>(<04><0F><0E> <09> <09> <0C> <0A><18><17><1D>"<22>D<EFBFBD><1B><06><1B><1C><11>B<01> <0E><08>~<17>~<17>B" <0A>J#<19>#<19>L><1E>D<EFBFBD>><1E><>k<13><1C><1B><17><><1C>s<00>A%<00>%A8<03>,A3<03>3A8