UV[c!@sKdZddkZddkZddkZddkZddkZddkZddkZddkZddk l Z ddk l Z ddk lZddkTddklZlZddklZdd klZdd klZdd klZdd klZlZdd klZddk l!Z!ddk"l#Z#ddk$l%Z%ddk&l'Z'l(Z(l)Z)ddk*l+Z+l,Z,l-Z-l.Z.ddk/l0Z0l1Z1yddk2l3Z3Wn#e4j oddk5l3Z3nXgZ6dZ7ddk8Z8e8i9e7de:fdYZ;de:fdYZ<dei=fdYZ>dS(s. L{Transport} handles the core SSH2 protocol. iN(tutil(t AuthHandler(tChannel(t*(tZlibCompressortZlibDecompressor(tDSSKey(tKexGex(t KexGroup1(tMessage(t PacketizertNeedRekeyException(t ModulusPack(tRSAKey(tServerInterface(t SFTPClient(t SSHExceptiontBadAuthenticationTypetChannelException(tBlowfishtAEStDES3tARC4(tSHAtMD5(tCountercCsxtD]}|iqWdS(N(t_active_threadst stop_thread(tthr((s6/usr/lib/python2.6/site-packages/paramiko/transport.pyt_join_lingering_threads?stSecurityOptionscBseZdZddddddgZdZdZd Zd Zd Zd Z d Z dZ dZ dZ dZdZdZeee ddZeee ddZeeeddZee eddZee eddZRS(s8 Simple object containing the security preferences of an ssh transport. These are tuples of acceptable ciphers, digests, key types, and key exchange algorithms, listed in order of preference. Changing the contents and/or order of these fields affects the underlying L{Transport} (but only if you change them before starting the session). If you try to add an algorithm that paramiko doesn't recognize, C{ValueError} will be raised. If you try to assign something besides a tuple to one of the fields, C{TypeError} will be raised. tcipherstdigestst key_typestkext compressiont _transportcCs ||_dS(N(R$(tselft transport((s6/usr/lib/python2.6/site-packages/paramiko/transport.pyt__init__TscCsdt|iS(se Returns a string representation of this object, for debugging. @rtype: str s!(treprR$(R%((s6/usr/lib/python2.6/site-packages/paramiko/transport.pyt__repr__WscCs |iiS(N(R$t_preferred_ciphers(R%((s6/usr/lib/python2.6/site-packages/paramiko/transport.pyt _get_ciphers_scCs |iiS(N(R$t_preferred_macs(R%((s6/usr/lib/python2.6/site-packages/paramiko/transport.pyt _get_digestsbscCs |iiS(N(R$t_preferred_keys(R%((s6/usr/lib/python2.6/site-packages/paramiko/transport.pyt_get_key_typesescCs |iiS(N(R$t_preferred_kex(R%((s6/usr/lib/python2.6/site-packages/paramiko/transport.pyt_get_kexhscCs |iiS(N(R$t_preferred_compression(R%((s6/usr/lib/python2.6/site-packages/paramiko/transport.pyt_get_compressionkscst|tjot|}nt|tj otdnt|i|itfd|}t|djot dnt |i||dS(Nsexpected tuple or listcs |jS(((tn(tpossible(s6/usr/lib/python2.6/site-packages/paramiko/transport.pyttsisunknown cipher( ttypetlistttuplet TypeErrortgetattrR$tkeystfiltertlent ValueErrortsetattr(R%tnametorigtxt forbidden((R5s6/usr/lib/python2.6/site-packages/paramiko/transport.pyt_setnscCs|idd|dS(NR*t _cipher_info(RE(R%RC((s6/usr/lib/python2.6/site-packages/paramiko/transport.pyt _set_ciphersyscCs|idd|dS(NR,t _mac_info(RE(R%RC((s6/usr/lib/python2.6/site-packages/paramiko/transport.pyt _set_digests|scCs|idd|dS(NR.t _key_info(RE(R%RC((s6/usr/lib/python2.6/site-packages/paramiko/transport.pyt_set_key_typesscCs|idd|dS(NR0t _kex_info(RE(R%RC((s6/usr/lib/python2.6/site-packages/paramiko/transport.pyt_set_kexscCs|idd|dS(NR2t_compression_info(RE(R%RC((s6/usr/lib/python2.6/site-packages/paramiko/transport.pyt_set_compressionssSymmetric encryption cipherss Digest (one-way hash) algorithmssPublic-key algorithmssKey exchange algorithmssCompression algorithmsN(t__name__t __module__t__doc__t __slots__R'R)R+R-R/R1R3RERGRIRKRMROtpropertytNoneRR R!R"R#(((s6/usr/lib/python2.6/site-packages/paramiko/transport.pyRFs0                    t ChannelMapcBs>eZdZdZdZdZdZdZRS(cCs"ti|_ti|_dS(N(tweakreftWeakValueDictionaryt_mapt threadingtLockt_lock(R%((s6/usr/lib/python2.6/site-packages/paramiko/transport.pyR'scCs3|iiz||i|RYR^(R%((s6/usr/lib/python2.6/site-packages/paramiko/transport.pyt__len__s (RPRQR'RaRbRdReRf(((s6/usr/lib/python2.6/site-packages/paramiko/transport.pyRVs     t TransportcBs~eZdZdZdZdjZdkZdlZdmZdnZ hhe d6e i d6dd6dd6d6he d6e i d6dd6dd6d6he d6e i d6dd6dd6d6he d6e i d6dd6dd6d6he d6e i d6dd6dd6d6hed6ei d6dd6dd6d6hed6dod6dd6dd6d 6hed6dod6dd6dd6d 6Zhhed6dd6d 6hed6dd6d 6hed6dd6d 6hed6dd6d6Zhed6ed6Zhed6ed6Zheefd6eefd 6dpd6ZdoZd!Zd"Z d#Z!d$Z"dod%Z#dodod&Z$d'Z%d(Z&dod)Z'e(e'Z'd*Z)d+Z*d,Z+d-Z,dod.Z-d/Z.dodod0Z/dod1Z0d2Z1d3Z2dod4Z3d5Z4d6Z5doe6d7Z7dod8Z8dod9dodod:Z9d;Z:d<Z;d=Z<d>Z=d?Z>doe6d@Z?dodAZ@d9dBZAdCZBdDZCdEZDdFZEe6dGZFdHZGdIZHdJZIdKZJdLZKdMZLdNZMdOZNdPZOdQZPdRZQdSZRdTZSdUZTdVZUdWZVdXZWdYZXdZZYd[ZZd\Z[d]Z\d^Z]d_Z^d`Z_daZ`dbZadcZbddZcdeZddfZedgZfdhZgdiZhhe_ei6eaej6ebek6ecel6edem6eeen6efeo6eXep6Zqheriset6eriuev6eriwex6eriyez6eri{e|6eri}e~6erie6erie6ZRS(qs8 An SSH Transport attaches to a stream (usually a socket), negotiates an encrypted session, authenticates, and then creates stream tunnels, called L{Channel}s, across the session. Multiple channels can be multiplexed across a single session (and often are, in the case of port forwardings). s2.0sparamiko_1.7.5s aes128-ctrs aes256-ctrs aes128-cbcs blowfish-cbcs aes256-cbcs3des-cbct arcfour128t arcfour256s hmac-sha1shmac-md5s hmac-sha1-96s hmac-md5-96sssh-rsasssh-dsssdiffie-hellman-group1-sha1s"diffie-hellman-group-exchange-sha1tnonetclasstmodeis block-sizeskey-sizei iiitsizei szlib@openssh.comtzlibcCst|ttfoW|idd}t|djo|ddf}qm|dt|df}nt|tjo;|\}}titi ti }|i ||fnt i i||itt|_||_y|iidWntj onXt||_d|id|i|_d|_d|_|_d|_|_d|_ |_!d|_"|_#d|_$d|_%d|_&d|_'d|_(d|_)t*|_+t*|_,t*|_-t*|_.t|_/t i0|_1t2|_3h|_4h|_5d|_6d |_7d |_8d|_9d|_:d|_;t i<|_=t i0|_>d |_?d |_@tAiB|i@|_C|iiD|iCd|_Ed|_Fd|_Gd |_Ht*|_Id|_Jh|_Kg|_Lt iM|i1|_Nh|_OdS(s Create a new SSH session over an existing socket, or socket-like object. This only creates the Transport object; it doesn't begin the SSH session yet. Use L{connect} or L{start_client} to begin a client session, or L{start_server} to begin a server session. If the object is not actually a socket, it must have the following methods: - C{send(str)}: Writes from 1 to C{len(str)} bytes, and returns an int representing the number of bytes written. Returns 0 or raises C{EOFError} if the stream has been closed. - C{recv(int)}: Reads from 1 to C{int} bytes and returns them as a string. Returns 0 or raises C{EOFError} if the stream has been closed. - C{close()}: Closes the socket. - C{settimeout(n)}: Sets a (float) timeout on I/O operations. For ease of use, you may also pass in an address (as a tuple) or a host string as the C{sock} argument. (A host string is a hostname with an optional port (separated by C{":"}) which will be converted into a tuple of C{(hostname, port)}.) A socket will be connected to this address and used for communication. Exceptions from the C{socket} call may be thrown in this case. @param sock: a socket or socket-like object to create the session over. @type sock: socket t:iiig?sSSH-t-tiig>@sparamiko.transportiN(Pt isinstancetstrtunicodetsplitR>tintR7R9tsockettAF_INETt SOCK_STREAMtconnectRZtThreadR't setDaemontTruetrandpooltsockt settimeouttAttributeErrorR t packetizert _PROTO_IDt _CLIENT_IDt local_versiontremote_versiont local_ciphert remote_cipherRUtlocal_kex_inittremote_kex_initt local_mact remote_mactlocal_compressiontremote_compressiont session_idt host_key_typethost_keyt kex_enginetHtKtFalsetactivetinitial_kex_donetin_kext authenticatedt_expected_packetR[tlockRVt _channelstchannel_eventst channels_seent_channel_countert window_sizetmax_packet_sizet _x11_handlert _tcp_handlertsaved_exceptiontEventt clear_to_sendtclear_to_send_locktclear_to_send_timeouttlog_nameRt get_loggertloggertset_logt auth_handlertglobal_responsetcompletion_eventtbanner_timeoutt server_modet server_objecttserver_key_dicttserver_acceptst Conditiontserver_accept_cvtsubsystem_table(R%Rthlthostnametport((s6/usr/lib/python2.6/site-packages/paramiko/transport.pyR'sz                                   cCsdttt|d@}|ip|d7}n|idjo-|d|i|i|iddf7}n|io|dt|i7}n#|i o|d 7}n |d 7}|d 7}|S( se Returns a string representation of this object, for debugging. @rtype: str s( thextlongtidRRRFtis_authenticatedR>RR(R%tout((s6/usr/lib/python2.6/site-packages/paramiko/transport.pyR)fs   !    cCs|ii|idS(s Terminate this Transport without closing the session. On posix systems, if a Transport is open during process forking, both parent and child will share the underlying socket, but only one process can use the connection (without corrupting the session). Use this method to clean up a Transport object without disrupting the other process. @since: 1.5.3 N(Rtclose(R%((s6/usr/lib/python2.6/site-packages/paramiko/transport.pytatfork|s cCs t|S(sw Return a L{SecurityOptions} object which can be used to tweak the encryption algorithms this transport will permit, and the order of preference for them. @return: an object that can be used to change the preferred algorithms for encryption, digest (hash), public key, and key exchange. @rtype: L{SecurityOptions} (R(R%((s6/usr/lib/python2.6/site-packages/paramiko/transport.pytget_security_optionss cCst|_|dj o||_|idSti|_}|ixhto`|id|ip3|i}|dj o |nt dn|i oPqNqNWdS(s Negotiate a new SSH2 session as a client. This is the first step after creating a new L{Transport}. A separate thread is created for protocol negotiation. If an event is passed in, this method returns immediately. When negotiation is done (successful or not), the given C{Event} will be triggered. On failure, L{is_active} will return C{False}. (Since 1.4) If C{event} is C{None}, this method will not return until negotation is done. On success, the method returns normally. Otherwise an SSHException is raised. After a successful negotiation, you will usually want to authenticate, calling L{auth_password } or L{auth_publickey }. @note: L{connect} is a simpler method for connecting as a client. @note: After calling this method (or L{start_server} or L{connect}), you should no longer directly read from or write to the original socket object. @param event: an event to trigger when negotiation is complete (optional) @type event: threading.Event @raise SSHException: if negotiation fails (and no C{event} was passed in) Ng?sNegotiation failed.( R}RRURtstartRZRtwaitt get_exceptionRtisSet(R%teventte((s6/usr/lib/python2.6/site-packages/paramiko/transport.pyt start_clients"           cCs|djo t}nt|_||_t|_|dj o||_|idSti |_}|ixhto`|i d|ip3|i }|dj o |nt dn|i oPqzqzWdS(sk Negotiate a new SSH2 session as a server. This is the first step after creating a new L{Transport} and setting up your server host key(s). A separate thread is created for protocol negotiation. If an event is passed in, this method returns immediately. When negotiation is done (successful or not), the given C{Event} will be triggered. On failure, L{is_active} will return C{False}. (Since 1.4) If C{event} is C{None}, this method will not return until negotation is done. On success, the method returns normally. Otherwise an SSHException is raised. After a successful negotiation, the client will need to authenticate. Override the methods L{get_allowed_auths }, L{check_auth_none }, L{check_auth_password }, and L{check_auth_publickey } in the given C{server} object to control the authentication process. After a successful authentication, the client should request to open a channel. Override L{check_channel_request } in the given C{server} object to allow channels to be opened. @note: After calling this method (or L{start_client} or L{connect}), you should no longer directly read from or write to the original socket object. @param event: an event to trigger when negotiation is complete. @type event: threading.Event @param server: an object used to perform authentication and create L{Channel}s. @type server: L{server.ServerInterface} @raise SSHException: if negotiation fails (and no C{event} was passed in) Ng?sNegotiation failed.(RURR}RRRRRRZRRRRR(R%RtserverR((s6/usr/lib/python2.6/site-packages/paramiko/transport.pyt start_servers*(               cCs||i|i} or L{DSSKey }. @type key: L{PKey } N(Rtget_name(R%tkey((s6/usr/lib/python2.6/site-packages/paramiko/transport.pytadd_server_keys cCs,y|i|iSWntj onXdS(s Return the active host key, in server mode. After negotiating with the client, this method will return the negotiated host key. If only one type of host key was set with L{add_server_key}, that's the only key that will ever be returned. But in cases where you have set more than one type of host key (for example, an RSA key and a DSS key), the key type will be negotiated by the client, and this method will return the key of the type agreed on. If the host key has not been negotiated yet, C{None} is returned. In client mode, the behavior is undefined. @return: host key of the type negotiated by the client, or C{None}. @rtype: L{PKey } N(RRRcRU(R%((s6/usr/lib/python2.6/site-packages/paramiko/transport.pytget_server_keys cCsttt_ddg}|dj o|id|nx<|D]4}ytii|tSWqCtj oqCXqCWdt_t S(s I{(optional)} Load a file of prime moduli for use in doing group-exchange key negotiation in server mode. It's a rather obscure option and can be safely ignored. In server mode, the remote client may request "group-exchange" key negotiation, which asks the server to send a random prime number that fits certain criteria. These primes are pretty difficult to compute, so they can't be generated on demand. But many systems contain a file of suitable primes (usually named something like C{/etc/ssh/moduli}). If you call C{load_server_moduli} and it returns C{True}, then this file of primes has been loaded and we will support "group-exchange" in server mode. Otherwise server mode will just claim that it doesn't support that method of key negotiation. @param filename: optional path to the moduli file, if you happen to know that it's not in a standard location. @type filename: str @return: True if a moduli file was successfully loaded; False otherwise. @rtype: bool @note: This has no effect when used in client mode. s/etc/ssh/modulis/usr/local/etc/moduliiN( R R~Rgt _modulus_packRUtinsertt read_fileR}tIOErrorR(tfilenamet file_listtfn((s6/usr/lib/python2.6/site-packages/paramiko/transport.pytload_server_moduli+s    cCsW|ipdSt|_|ii|ix!|iiD]}|iq?WdS(sP Close this session, and any open channels that are tied to it. N(RRRRtjoinRRet_unlink(R%R`((s6/usr/lib/python2.6/site-packages/paramiko/transport.pyRUs    cCs-|i p |i otdn|iS(s Return the host key of the server (in client mode). @note: Previously this call returned a tuple of (key type, key string). You can get the same effect by calling L{PKey.get_name } for the key type, and C{str(key)} for the key string. @raise SSHException: if no session is currently active. @return: public key of the remote server @rtype: L{PKey } sNo existing session(RRRR(R%((s6/usr/lib/python2.6/site-packages/paramiko/transport.pytget_remote_server_keyascCs|iS(s Return true if this session is active (open). @return: True if the session is still active (open); False if the session is closed @rtype: bool (R(R%((s6/usr/lib/python2.6/site-packages/paramiko/transport.pyt is_activesscCs |idS(s6 Request a new channel to the server, of type C{"session"}. This is just an alias for C{open_channel('session')}. @return: a new L{Channel} @rtype: L{Channel} @raise SSHException: if the request is rejected or the session ends prematurely tsession(t open_channel(R%((s6/usr/lib/python2.6/site-packages/paramiko/transport.pyt open_session}s cCs|idd|S(s Request a new channel to the client, of type C{"x11"}. This is just an alias for C{open_channel('x11', src_addr=src_addr)}. @param src_addr: the source address of the x11 server (port is the x11 port, ie. 6010) @type src_addr: (str, int) @return: a new L{Channel} @rtype: L{Channel} @raise SSHException: if the request is rejected or the session ends prematurely tx11tsrc_addr(R(R%R((s6/usr/lib/python2.6/site-packages/paramiko/transport.pytopen_x11_channelscCs7|\}}|\}}|id||f||fS(s Request a new channel back to the client, of type C{"forwarded-tcpip"}. This is used after a client has requested port forwarding, for sending incoming connections back to the client. @param src_addr: originator's address @param src_port: originator's port @param dest_addr: local (server) connected address @param dest_port: local (server) connected port sforwarded-tcpip(R(R%t.1t.2Rtsrc_portt dest_addrt dest_port((s6/usr/lib/python2.6/site-packages/paramiko/transport.pytopen_forwarded_tcpip_channels c Cscd}|ipdS|iiza|i}t}|itt|i ||i ||i |i |i |i |djp |djoH|i |d|i |d|i |d|i |dn4|djo&|i |d|i |dnt |}|ii||ti|i|<}t|i|<|i||i|i |i Wd|iiX|i|xhto`|id|ip3|i}|djotd}n|n|ioPqqW|ii|}|dj o|S|i}|djotd}n|dS( s  Request a new channel to the server. L{Channel}s are socket-like objects used for the actual transfer of data across the session. You may only request a channel after negotiating encryption (using L{connect} or L{start_client}) and authenticating. @param kind: the kind of channel requested (usually C{"session"}, C{"forwarded-tcpip"}, C{"direct-tcpip"}, or C{"x11"}) @type kind: str @param dest_addr: the destination address of this port forwarding, if C{kind} is C{"forwarded-tcpip"} or C{"direct-tcpip"} (ignored for other channel types) @type dest_addr: (str, int) @param src_addr: the source address of this port forwarding, if C{kind} is C{"forwarded-tcpip"}, C{"direct-tcpip"}, or C{"x11"} @type src_addr: (str, int) @return: a new L{Channel} on success @rtype: L{Channel} @raise SSHException: if the request is rejected or the session ends prematurely sforwarded-tcpips direct-tcpipiiRNg?sUnable to open channel.(RURRR]t _next_channelR tadd_bytetchrtMSG_CHANNEL_OPENt add_stringtadd_intRRRRRaRZRRR}Rt_set_transportt _set_windowR^t_send_user_messageRRRRRb( R%tkindRRR`R_tmRR((s6/usr/lib/python2.6/site-packages/paramiko/transport.pyRsZ                     csiptdnt|}t|}id||fdt}|djotdn|djo|i}n|djofd}|}n|_|S(s Ask the server to forward TCP connections from a listening port on the server, across this SSH session. If a handler is given, that handler is called from a different thread whenever a forwarded connection arrives. The handler parameters are:: handler(channel, (origin_addr, origin_port), (server_addr, server_port)) where C{server_addr} and C{server_port} are the address and port that the server was listening on. If no handler is set, the default behavior is to send new incoming forwarded connections into the accept queue, to be picked up via L{accept}. @param address: the address to bind when forwarding @type address: str @param port: the port to forward, or 0 to ask the server to allocate any port @type port: int @param handler: optional handler for incoming forwarded connections @type handler: function(Channel, (str, int), (str, int)) @return: the port # allocated by the server @rtype: int @raise SSHException: if the server refused the TCP forward request sSSH session not actives tcpip-forwardRsTCP forwarding request deniedics)|\}}|\}}i|dS(N(t_queue_incoming_channel(tchannelRRRRRR(R%(s6/usr/lib/python2.6/site-packages/paramiko/transport.pytdefault_handlersN( RRRsRvtglobal_requestR}RUtget_intR(R%taddressRthandlertresponseR((R%s6/usr/lib/python2.6/site-packages/paramiko/transport.pytrequest_port_forwards        cCs8|ipdSd|_|id||fdtdS(sa Ask the server to cancel a previous port-forwarding request. No more connections to the given address & port will be forwarded across this ssh connection. @param address: the address to stop forwarding @type address: str @param port: the port to stop forwarding @type port: int Nscancel-tcpip-forwardR(RRURRR}(R%RR((s6/usr/lib/python2.6/site-packages/paramiko/transport.pytcancel_port_forwards  cCs ti|S(s\ Create an SFTP client channel from an open transport. On success, an SFTP session will be opened with the remote host, and a new SFTPClient object will be returned. @return: a new L{SFTPClient} object, referring to an sftp session (channel) across this transport @rtype: L{SFTPClient} (Rtfrom_transport(R%((s6/usr/lib/python2.6/site-packages/paramiko/transport.pytopen_sftp_client*s cCs{t}|ittti|djo!ttiddd}n|i ti||i |dS(s Send a junk packet across the encrypted link. This is sometimes used to add "noise" to a connection to confuse would-be attackers. It can also be used as a keep-alive for long lived connections traversing firewalls. @param bytes: the number of random bytes to send in the payload of the ignored packet -- defaults to a random number from 10 to 41. @type bytes: int ii i N( R RRt MSG_IGNORER~tstirRUtordt get_bytest add_bytesR(R%tbytesR((s6/usr/lib/python2.6/site-packages/paramiko/transport.pyt send_ignore6s   !cCsti|_|ixntof|iid|ip3|i}|dj o |nt dn|ii oPqqWdS(s8 Force this session to switch to new keys. Normally this is done automatically after the session hits a certain number of packets or bytes sent or received, but this method gives you the option of forcing new keys whenever you want. Negotiating new keys causes a pause in traffic both ways as the two sides swap keys and do computations. This method returns when the session has switched to new keys. @raise SSHException: if the key renegotiation failed (which causes the session to end) g?sNegotiation failed.N( RZRRt_send_kex_initR}RRRRURR(R%R((s6/usr/lib/python2.6/site-packages/paramiko/transport.pytrenegotiate_keysIs       cCs&|ii|ti|ddS(s Turn on/off keepalive packets (default is off). If this is set, after C{interval} seconds without sending any data over the connection, a "keepalive" packet will be sent (and ignored by the remote host). This can be useful to keep connections alive over a NAT, for example. @param interval: seconds to wait before sending a keepalive packet (or 0 to disable keepalives). @type interval: int cSs|iddtS(skeepalive@lag.netR(RR(RC((s6/usr/lib/python2.6/site-packages/paramiko/transport.pyR6nsN(Rt set_keepaliveRWtproxy(R%tinterval((s6/usr/lib/python2.6/site-packages/paramiko/transport.pyR bs cCs|oti|_nt}|itt|i||i||dj o|i |n|i t d||i ||pdSx@to8|iid|ipdS|iioPqqW|iS(s Make a global request to the remote host. These are normally extensions to the SSH2 protocol. @param kind: name of the request. @type kind: str @param data: an optional tuple containing additional data to attach to the request. @type data: tuple @param wait: C{True} if this method should not return until a response is received; C{False} otherwise. @type wait: bool @return: a L{Message} containing possible additional data if the request was successful (or an empty L{Message} if C{wait} was C{False}); C{None} if the request was denied. @rtype: L{Message} sSending global request "%s"g?N(RZRRR RRtMSG_GLOBAL_REQUESTRt add_booleanRUtaddt_logtDEBUGRR}RRRR(R%RtdataRR((s6/usr/lib/python2.6/site-packages/paramiko/transport.pyRps(       cCs|iizrt|idjo|iid}nC|ii|t|idjo|iid}nd}Wd|iiX|S(s Return the next channel opened by the client over this transport, in server mode. If no channel is opened before the given timeout, C{None} is returned. @param timeout: seconds to wait for a channel, or C{None} to wait forever @type timeout: int @return: a new Channel opened by the client @rtype: L{Channel} iN( RR]R>RtpopRRRUR^(R%ttimeoutR`((s6/usr/lib/python2.6/site-packages/paramiko/transport.pytaccepts  RqcCs|dj o|ig|_n|i|dj o|i}|i|ijpt|t|jox|itd|itd|itt|f|itd|itt|ft dn|itd|in|dj p |dj oU|dj o$|itd|i ||q}|itd|i ||ndS(s Negotiate an SSH2 session, and optionally verify the server's host key and authenticate using a password or private key. This is a shortcut for L{start_client}, L{get_remote_server_key}, and L{Transport.auth_password} or L{Transport.auth_publickey}. Use those methods if you want more control. You can use this method immediately after creating a Transport to negotiate encryption with a server. If it fails, an exception will be thrown. On success, the method will return cleanly, and an encrypted session exists. You may immediately call L{open_channel} or L{open_session} to get a L{Channel} object, which is used for data transfer. @note: If you fail to supply a password or private key, this method may succeed, but a subsequent L{open_channel} or L{open_session} call may fail because you haven't authenticated yet. @param hostkey: the host key expected from the server, or C{None} if you don't want to do host key verification. @type hostkey: L{PKey} @param username: the username to authenticate as. @type username: str @param password: a password to use for authentication, if you want to use password authentication; otherwise C{None}. @type password: str @param pkey: a private key to use for authentication, if you want to use private key authentication; otherwise C{None}. @type pkey: L{PKey} @raise SSHException: if the SSH2 negotiation fails, the host key supplied by the server is incorrect, or authentication fails. sBad host key from serversExpected: %s: %ssGot : %s: %ssHost key verified (%s)sAttempting password auth...sAttempting public-key auth...N( RURR.RRRsRRR(Rt auth_passwordtauth_publickey(R%thostkeytusernametpasswordtpkeyR((s6/usr/lib/python2.6/site-packages/paramiko/transport.pyRzs$"    2,, cCs<|iiz|i}d|_|SWd|iiXdS(s Return any exception that happened during the last server request. This can be used to fetch more specific error information after using calls like L{start_client}. The exception (if any) is cleared after this call. @return: an exception, or C{None} if there is no stored exception. @rtype: Exception @since: 1.1 N(RR]RRUR^(R%R((s6/usr/lib/python2.6/site-packages/paramiko/transport.pyRs   cOs<z'|ii|||f|i|R(ttitlet instructionstfields(R(s6/usr/lib/python2.6/site-packages/paramiko/transport.pyRs N( RRRRURZRRRRR Rt allowed_typestauth_interactive( R%RRRtfallbackR!RCRtignored((Rs6/usr/lib/python2.6/site-packages/paramiko/transport.pyRIs(0   cCs|i p |i otdn|djoti}n|}t||_|ii||||dj ogS|ii |S(s Authenticate to the server using a private key. The key is used to sign data from the server, so it must include the private part. If an C{event} is passed in, this method will return immediately, and the event will be triggered once authentication succeeds or fails. On success, L{is_authenticated} will return C{True}. On failure, you may use L{get_exception} to get more detailed error information. Since 1.1, if no event is passed, this method will block until the authentication succeeds or fails. On failure, an exception is raised. Otherwise, the method simply returns. If the server requires multi-step authentication (which is very rare), this method will return a list of auth types permissible for the next step. Otherwise, in the normal case, an empty list is returned. @param username: the username to authenticate as @type username: string @param key: the private key to authenticate with @type key: L{PKey } @param event: an event to trigger when the authentication attempt is complete (whether it was successful or not) @type event: threading.Event @return: list of auth types permissible for the next stage of authentication (normally empty) @rtype: list @raise BadAuthenticationType: if public-key authentication isn't allowed by the server for this user (and no event was passed in) @raise AuthenticationException: if the authentication failed (and no event was passed in) @raise SSHException: if there was a network error sNo existing sessionN( RRRRURZRRRRR (R%RRRR!((s6/usr/lib/python2.6/site-packages/paramiko/transport.pyRs#  cCsj|i p |i otdnti}t||_|ii|||||ii|S(s` Authenticate to the server interactively. A handler is used to answer arbitrary questions from the server. On many servers, this is just a dumb wrapper around PAM. This method will block until the authentication succeeds or fails, peroidically calling the handler asynchronously to get answers to authentication questions. The handler may be called more than once if the server continues to ask questions. The handler is expected to be a callable that will handle calls of the form: C{handler(title, instructions, prompt_list)}. The C{title} is meant to be a dialog-window title, and the C{instructions} are user instructions (both are strings). C{prompt_list} will be a list of prompts, each prompt being a tuple of C{(str, bool)}. The string is the prompt and the boolean indicates whether the user text should be echoed. A sample call would thus be: C{handler('title', 'instructions', [('Password:', False)])}. The handler should return a list or tuple of answers to the server's questions. If the server requires multi-step authentication (which is very rare), this method will return a list of auth types permissible for the next step. Otherwise, in the normal case, an empty list is returned. @param username: the username to authenticate as @type username: string @param handler: a handler for responding to server questions @type handler: callable @param submethods: a string list of desired submethods (optional) @type submethods: str @return: list of auth types permissible for the next stage of authentication (normally empty). @rtype: list @raise BadAuthenticationType: if public-key authentication isn't allowed by the server for this user @raise AuthenticationException: if the authentication failed @raise SSHException: if there was a network error @since: 1.5 sNo existing session( RRRRZRRRR&R (R%RRt submethodsR!((s6/usr/lib/python2.6/site-packages/paramiko/transport.pyR&s . cCs2||_ti||_|ii|idS(sp Set the channel for this transport's logging. The default is C{"paramiko.transport"} but it can be set to anything you want. (See the C{logging} module for more info.) SSH Channels will log to a sub-channel of the one specified. @param name: new channel name for logging @type name: str @since: 1.1 N(RRRRRR(R%RA((s6/usr/lib/python2.6/site-packages/paramiko/transport.pytset_log_channels cCs|iS(s Return the channel name used for this transport's logging. @return: channel name. @rtype: str @since: 1.2 (R(R%((s6/usr/lib/python2.6/site-packages/paramiko/transport.pytget_log_channels cCs|ii|dS(sj Turn on/off logging a hex dump of protocol traffic at DEBUG level in the logs. Normally you would want this off (which is the default), but if you are debugging something, it may be useful. @param hexdump: C{True} to log protocol traffix (in hex) to the log; C{False} otherwise. @type hexdump: bool N(Rt set_hexdump(R%thexdump((s6/usr/lib/python2.6/site-packages/paramiko/transport.pyR,s cCs |iiS(s Return C{True} if the transport is currently logging hex dumps of protocol traffic. @return: C{True} if hex dumps are being logged @rtype: bool @since: 1.4 (Rt get_hexdump(R%((s6/usr/lib/python2.6/site-packages/paramiko/transport.pyR.*s cCs!|o d|_n d|_dS(s Turn on/off compression. This will only have an affect before starting the transport (ie before calling L{connect}, etc). By default, compression is off since it negatively affects interactive sessions. @param compress: C{True} to ask the remote client/server to compress traffic; C{False} to refuse compression @type compress: bool @since: 1.5.2 szlib@openssh.comRnRjN(szlib@openssh.comszlibRj(Rj(R2(R%tcompress((s6/usr/lib/python2.6/site-packages/paramiko/transport.pytuse_compression6s  cCs.t|idd}|djodS|S(s Return the address of the remote side of this Transport, if possible. This is effectively a wrapper around C{'getpeername'} on the underlying socket. If the socket-like object has no C{'getpeername'} method, then C{("unknown", 0)} is returned. @return: the address if the remote host, if known @rtype: tuple(str, int) t getpeernametunknowniN(sunknowni(R;RRU(R%tgp((s6/usr/lib/python2.6/site-packages/paramiko/transport.pyR1Gs  cCst|_|iidS(N(RRRR(R%((s6/usr/lib/python2.6/site-packages/paramiko/transport.pyRVs cGsXtt|to(x;|D]}|ii||qWn|ii|||dS(N(t issubclassR7R8Rtlog(R%tleveltmsgtargsR((s6/usr/lib/python2.6/site-packages/paramiko/transport.pyR^s cCs|iS(s0used by KexGex to find primes for group exchange(R(R%((s6/usr/lib/python2.6/site-packages/paramiko/transport.pyt_get_modulus_packescCs_|i}x;|ii|dj o!|idd@|_|i}q W|idd@|_|S(syou are holding the lockiiN(RRRbRU(R%R_((s6/usr/lib/python2.6/site-packages/paramiko/transport.pyRis cCs|ii|dS(s?used by a Channel to remove itself from the active channel listN(RRd(R%R_((s6/usr/lib/python2.6/site-packages/paramiko/transport.pyt_unlink_channelrscCs|ii|dS(N(Rt send_message(R%R((s6/usr/lib/python2.6/site-packages/paramiko/transport.pyt _send_messagevscCsti}xto|iid|ip|itddS|ii|ii oPn|ii ti||i jot dqqWz|i |Wd|ii XdS(s{ send a message, but block if we're in key negotiation. this is used for user-initiated requests. g?s0Dropping user packet because connection is dead.Ns2Key-exchange timed out waiting for key negotiation(ttimeR}RRRRRRR]RR^RRR<(R%RR((s6/usr/lib/python2.6/site-packages/paramiko/transport.pyRys     cCs3||_||_|idjo ||_ndS(sBused by a kex object to set the K (root key) and H (exchange hash)N(RRRRU(R%tkth((s6/usr/lib/python2.6/site-packages/paramiko/transport.pyt_set_K_Hs  cGst||_dS(sGused by a kex object to register the next packet type it expects to seeN(R9R(R%tptypes((s6/usr/lib/python2.6/site-packages/paramiko/transport.pyt_expect_packetscCsy|i|it|}|djotdn|i|it|ptd|in||_dS(NsUnknown host key types#Signature verification (%s) failed.(RJRR RURtverify_ssh_sigRR(R%RtsigR((s6/usr/lib/python2.6/site-packages/paramiko/transport.pyt _verify_keys  cCst}|i|i|i|i|i||i|itit |i }}x}t ||joit}|i|i|i|i|i|tit |i }||7}||7}qhW|| S(s0id is 'A' - 'F' for the various keys used by ssh( R t add_mpintRRRRRRtnewRstdigestR>(R%RtnbytesRRtsofarRH((s6/usr/lib/python2.6/site-packages/paramiko/transport.pyt _compute_keys      cCs||ijotd|n|d jo0|i|di|}|idd|S|ido`tid|i|d d d ti|t}|i|di||i|d ||S|i|di||i|d |SdS(NsUnknown client cipher RhRiRkt is-ctrtnbitss block-sizeit initial_valueRl(RhRi( RFRRGtencrypttendswithRRt inflate_longR}(R%RARtivtciphertcounter((s6/usr/lib/python2.6/site-packages/paramiko/transport.pyt _get_ciphers 3-cs6|djofd}|_n |_dS(Ncs|\}}i|dS(N(R(RRRR(R%(s6/usr/lib/python2.6/site-packages/paramiko/transport.pyRs (RUR(R%RR((R%s6/usr/lib/python2.6/site-packages/paramiko/transport.pyt_set_x11_handlers  cCsC|iiz!|ii||iiWd|iiXdS(N(RR]RtappendRtnotifyR^(R%R((s6/usr/lib/python2.6/site-packages/paramiko/transport.pyRs  cCs|i p|tjp |iodSt}|tjo|ittnq|t joc|i }|i }|itt |i ||i t|id|idn|S(so Checks message type against current auth state. If server mode, and auth has not succeeded, and the message is of a post-auth type (channel open or global request) an appropriate error response Message is crafted and returned to caller for sending. Otherwise (client mode, authed, or pre-auth message) returns None. RqtenN(RtHIGHEST_USERAUTH_MESSAGE_IDRRUR R RRtMSG_REQUEST_FAILURERt get_stringRtMSG_CHANNEL_OPEN_FAILURERt'OPEN_FAILED_ADMINISTRATIVELY_PROHIBITEDR(R%tptypetmessagetreplyRR_((s6/usr/lib/python2.6/site-packages/paramiko/transport.pyt_ensure_autheds           c Csti||io.|itdttt|d@n+|itdttt|d@y#|ii |i d|i |i |i tx|io|iio|i o|i ny|ii\}}Wntj o qnX|tjoqnW|tjo(|i|t|_|iiPn"|tjo|i|qnt|idjoq||ijotd|i|fnt|_|djo'|djo|ii ||qqn||i!joB|i"||}|o|i#|q|i!|||q||i$jo|i%}|i&i'|}|dj o|i$|||q||i)jo|itd |q|it*d |t|_|iiq|i+dj o1||i+i!jo|i+i!||i+|q|it,d |t-}|i.t/t0|i1|i2|i#|qWWn=tj oB}|it*d t3||it*t4i5||_6nt7j o"}|itd ||_6nt8i9j og}t:|i;tjo"d|i;d|i;df}n |i;}|it*d|||_6nOt<j oB}|it*dt3||it*t4i5||_6nXti=|x!|i&i>D]}|i?qW|iot|_|ii|i@djo|i@iAn|i+dj o|i+iBnx!|iCi>D]} | iAquWz|iDiE|iFiGWd|iDiHXn|iIidS(Ns!starting thread (server mode): %sls!starting thread (client mode): %ss is Expecting packet from %r, got %dii's$Ignoring message for dead channel %ds&Channel request for unknown channel %dsOops, unhandled type %ds Exception: sEOF in transport threads%s (%d)isSocket exception: sUnknown exception: (JRRWRRRRRRRt write_allRt _check_bannerRRBt MSG_KEXINITRt need_rekeyRt read_messageR RtMSG_DISCONNECTt_parse_disconnectRRt MSG_DEBUGt _parse_debugR>RRR9Rt parse_nextt_handler_tableRbR<t_channel_handler_tableRRRbRURtERRORRtWARNINGR RRtMSG_UNIMPLEMENTEDRtseqnoRsRt tb_stringsRtEOFErrorRwterrorR7R8t ExceptiontremoveReRRtsettabortRRR]RRXR^R( R%R_Rt error_msgR_R`R7RtemsgR((s6/usr/lib/python2.6/site-packages/paramiko/transport.pytruns  .*                #   "       cCsk|iiz|iiWd|iiX|idjo|in|i||i i dS(N( RR]RtclearR^RRURt_parse_kex_initRt start_kex(R%R((s6/usr/lib/python2.6/site-packages/paramiko/transport.pyt_negotiate_keysks  c CsxtdD]}|djo |i}nd}y|ii|}Wn+tj o}tdt|nX|d djoPn|itd|q W|d djotd|d n||_ d }t i |d }|djo||d }|| }n|i d d}t |djotdn|d }|d}|djo$|djotd|fn|itd||fdS(Nidiis!Error reading SSH protocol bannerisSSH-sBanner: s!Indecipherable protocol version "t"RqRLiRpisInvalid SSH banners1.99s2.0s(Incompatible version (%s instead of 2.0)s!Connected (version %s, client %s)(trangeRRtreadlineRvRRsRRRtstringtfindRuR>tINFO( R%tiRtbufRCtcommenttsegstversiontclient((s6/usr/lib/python2.6/site-packages/paramiko/transport.pyRdxs8       cCs|iiz|iiWd|iiXt|_|iow|idjoEd|i jo5t |i i }|id||i _ nt|iii|i}n |i}tit}|itt|itid|i|i |i||i|i|i|i|i|i|i|i|i|i|i|i|i d|i d|i!t"|i#dt$||_%|i&|dS(s announce to the other side that we'd like to negotiate keys, and what kind of key negotiation we support. Ns"diffie-hellman-group-exchange-sha1iRqi('RR]RR}R^R}RRRRUR0R8RR"RwR=RR<t __contains__R.R~RR RRReRRtadd_listR*R,R2RR RRRsRR<(R%tpkextavailable_server_keysR((s6/usr/lib/python2.6/site-packages/paramiko/transport.pyRs>             c Cs|id}|i}|i}|i}|i}|i}|i}|i} |i} |i} |i} |i} |i}|itdt|dt|dt|dt|dt|dt|dt| d t| d t| d t| d t| |iot|i i |}nt|i |i }t |d jot dn|i |d ||_|io4t|iii |i}t|i |}nt|i |i}t |d jot dn|d |_|io#|idjot dn|io.t|ii |}t|ii |}n+t|i |i}t|i |i}t |d jpt |d jot dn|d |_|d |_|itd|i|if|io.t|ii |}t|ii |}n+t|i |i}t|i |i}t |d jpt |d jot dn|d |_|d |_|io.t|ii | }t|ii | }n+t| i |i}t| i |i}t |d jpt |d jo t d|||ifn|d |_|d |_|itd|d |i|i|i|i|i|i|iftt|i |_!dS(Nis kex algos:s server key:s client encrypt:s server encrypt:s client mac:s server mac:s client compress:s server compress:s client lang:s server lang:s kex follows?is3Incompatible ssh peer (no acceptable kex algorithm)s.Incompatible ssh peer (no acceptable host key)s;Incompatible ssh peer (can't match requested host key type)s/Incompatible ssh server (no acceptable ciphers)s#Ciphers agreed: local=%s, remote=%ss,Incompatible ssh server (no acceptable macs)s<Incompatible ssh server (no acceptable compression) %r %r %rsyusing kex %s; server key type %s; cipher: local %s, remote %s; mac: local %s, remote %s; compression: local %s, remote %s("Rtget_listt get_booleanRRRRsRR=R0RR>RRLRRR<R.RRRUR*RRR,RRR2RRRRet get_so_farR(R%Rtcookiet kex_algo_listtserver_key_algo_listtclient_encrypt_algo_listtserver_encrypt_algo_listtclient_mac_algo_listtserver_mac_algo_listtclient_compress_algo_listtserver_compress_algo_listtclient_lang_listtserver_lang_listt kex_followstunusedt agreed_kexRt agreed_keystagreed_local_cipherstagreed_remote_cipherstagreed_remote_macstagreed_local_macstagreed_remote_compressiontagreed_local_compression((s6/usr/lib/python2.6/site-packages/paramiko/transport.pyR~s                          &    &   &    c Cs|i|id}|io6|id|}|id|i|id}n3|id|}|id|i|id}|i|i||}|i|id}|i|id}|io|id |i}n|id |i}|ii ||||||i |i d }|dj oA|i d jp |i o'|itd |ii|ndS(sDswitch on newly negotiated encryption parameters for inbound traffics block-sizetAtCskey-sizetBtDRmRktEtFiszlib@openssh.coms$Switching on inbound compression ...N(RFRRRKRURHRt digest_sizeRtset_inbound_cipherRNRRURRRtset_inbound_compressor( R%t block_sizetIV_intkey_intenginetmac_sizet mac_enginetmac_keyt compress_in((s6/usr/lib/python2.6/site-packages/paramiko/transport.pyt_activate_inbound's" $  'c Cst}|itt|i||i|id}|io6|id|}|id|i|id}n3|id|}|id|i|id}|i |i||}|i |i d}|i |i d}|io|id |i }n|id |i }|i i||||||i|id } | dj oA|id jp |io'|itd |i i| n|i ip t|_n|itdS(sEswitch on newly negotiated encryption parameters for outbound traffics block-sizeRRskey-sizeRRRmRkRRiszlib@openssh.coms%Switching on outbound compression ...N(R RRt MSG_NEWKEYSR<RFRRRKRURHRRRtset_outbound_cipherRNRRURRRtset_outbound_compressorRfRRRB( R%RRtIV_outtkey_outRRRRt compress_out((s6/usr/lib/python2.6/site-packages/paramiko/transport.pyt_activate_outbound?s.   $  ' cCst|_|idjo;|i|id}|itd|ii|n|idjo;|i|id}|itd|ii |ndS(Nszlib@openssh.comis%Switching on outbound compression ...is$Switching on inbound compression ...( R}RRRNRRRRRR(R%RR((s6/usr/lib/python2.6/site-packages/paramiko/transport.pyt _auth_trigger^s cCs|itd|id|_|_d|_d|_|io#|i djot ||_ n|i p t |_ n|i djo|i in|iip t|_n|iiz|iiWd|iiXdS(NsSwitch to new keys ...(RRRRURRRRRRRRR}RRxRRfRRRR]RR^(R%R((s6/usr/lib/python2.6/site-packages/paramiko/transport.pyt_parse_newkeysjs$       cCs6|i}|i}|itd||fdS(NsDisconnect (code %d): %s(RR\RR(R%Rtcodetdesc((s6/usr/lib/python2.6/site-packages/paramiko/transport.pyRis  c Cs|i}|itd||i}|ip|itd|t}n|djoK|i}|i}|ii||}|tjo |f}qnX|djo5|i}|i}|ii ||t }n|ii ||}d}t |t jo|}t }n|oXt}|o$|itt|i|n|itt|i|ndS(NsReceived global request "%s"s*Rejecting "%s" global request from server.s tcpip-forwardscancel-tcpip-forward((R\RRRRRRRtcheck_port_forward_requesttcancel_port_forward_requestR}tcheck_global_requestR7R9R RRtMSG_REQUEST_SUCCESSRR[R<( R%RRt want_replytokRRtextraR7((s6/usr/lib/python2.6/site-packages/paramiko/transport.pyt_parse_global_requests:              cCs>|itd||_|idj o|iindS(NsGlobal request successful.(RRRRRURx(R%R((s6/usr/lib/python2.6/site-packages/paramiko/transport.pyt_parse_request_successs cCs>|itdd|_|idj o|iindS(NsGlobal request denied.(RRRURRRx(R%R((s6/usr/lib/python2.6/site-packages/paramiko/transport.pyt_parse_request_failures cCs|i}|i}|i}|i}|ii|}|djo|itddS|iizZ|i||||it d|||i jo|i |i |i |=nWd|ii XdS(Ns%Success for unrequested channel! [??]sSecsh channel %d opened.( RRRbRURRpRR]t_set_remote_channelRRRxR^(R%RR_t server_chanidtserver_window_sizetserver_max_packet_sizeR`((s6/usr/lib/python2.6/site-packages/paramiko/transport.pyt_parse_channel_open_successs"      cCs|i}|i}|i}|i}ti|d}|itd|||f|iizit|||_ ||i joC|i i |||i jo|i |i |i |=qnWd|iiXdS(Ns(unknown code)s$Secsh channel %d open FAILED: %s: %s(RR\tCONNECTION_FAILED_CODERbRRRR]RRRRRdRxR^(R%RR_treasont reason_strtlangt reason_text((s6/usr/lib/python2.6/site-packages/paramiko/transport.pyt_parse_channel_open_failures      c Cs.|i}|i}|i}|i}t}|djot|idj od|i}|i}|itd||f|iiz|i } Wd|ii Xn|djo|i dj o||i} |i} |i}|i}|itd||f|iiz|i } Wd|ii Xn|i p$|itd|t }t} n|iiz|i } Wd|ii X|djoX|i} |i}|i}|i}|ii| ||f| |f} n|ii|| } | tjo|itd|t }n|obt}|itt|i||i| |id|id |i|dSt| }|iizZ|ii| |t |i| <|i||i|i |i!|i"|||Wd|ii Xt}|itt#|i||i| |i|i |i|i!|i||it$d | ||djo|i|||fnM|djo2||f|_%|i |||f| | fn|i&|dS( NRs"Incoming x11 connection from %s:%dsforwarded-tcpips,Incoming tcp forwarded connection from %s:%ds+Rejecting "%s" channel request from server.s direct-tcpips+Rejecting "%s" channel request from client.RqRYsSecsh channel %d (%s) opened.('R\RRRRURRRR]RR^RRR}R^Rt"check_channel_direct_tcpip_requesttcheck_channel_requesttOPEN_SUCCEEDEDR RRR]RRR<RRRaRRRRRRtMSG_CHANNEL_OPEN_SUCCESSRt origin_addrR(R%RRR_tinitial_window_sizeRtrejectRt origin_portt my_chanidt server_addrt server_portRRRR7R`((s6/usr/lib/python2.6/site-packages/paramiko/transport.pyt_parse_channel_opens                                        #cCsE|i}|i}|i}|itdti|dS(Ns Debug msg: (RR\RRRt safe_string(R%Rtalways_displayR7R((s6/usr/lib/python2.6/site-packages/paramiko/transport.pyRk3s   cCsOz:|ii||ijodghfS|i|SWd|iiXdS(N(RR]RRUR^(R%RA((s6/usr/lib/python2.6/site-packages/paramiko/transport.pyt_get_subsystem_handler9s  (s aes128-ctrs aes256-ctrs aes128-cbcs blowfish-cbcs aes256-cbcs3des-cbcs arcfour128s arcfour256(s hmac-sha1shmac-md5s hmac-sha1-96s hmac-md5-96(sssh-rsasssh-dss(sdiffie-hellman-group1-sha1s"diffie-hellman-group-exchange-sha1(snoneN(NN(RPRQRRRRR*R,R.R0R2RtMODE_CTRRtMODE_CBCRRRURFRRRHR RRJRRRLRRRNRR'R)RRRRRRRt staticmethodRRRRRRRRRRRRR R}RRRzRRRRRRRR&R*R+R,R.R0R1RRR9RR:R<RR@RBRERKRURVRRbR|RRdRR~RRRRRiRRRRRRRkRRR RR[RR]RReRmRt_request_successtMSG_CHANNEL_SUCCESSt_request_failedtMSG_CHANNEL_FAILUREt_feedtMSG_CHANNEL_DATAt_feed_extendedtMSG_CHANNEL_EXTENDED_DATAt_window_adjusttMSG_CHANNEL_WINDOW_ADJUSTt_handle_requesttMSG_CHANNEL_REQUESTt _handle_eoftMSG_CHANNEL_EOFt _handle_closetMSG_CHANNEL_CLOSERn(((s6/usr/lib/python2.6/site-packages/paramiko/transport.pyRgs&&&&&&#&      l  3@   (    F -    & ;   S 1 6                & n $ * a     !     V          (?RRtosRwRtstructtsysRZR=RWtparamikoRtparamiko.auth_handlerRtparamiko.channelRtparamiko.commontparamiko.compressRRtparamiko.dsskeyRtparamiko.kex_gexRtparamiko.kex_group1Rtparamiko.messageR tparamiko.packetR R tparamiko.primesR tparamiko.rsakeyR tparamiko.serverRtparamiko.sftp_clientRtparamiko.ssh_exceptionRRRt Crypto.CipherRRRRt Crypto.HashRRt Crypto.UtilRt ImportErrort paramiko.utilRRtatexittregistertobjectRRVR{Rg(((s6/usr/lib/python2.6/site-packages/paramiko/transport.pytsH         "   M-