var searchIndex = {}; searchIndex["thrussh"] = {"doc":"Server and client SSH library. See the two example crates\n [thrussh_client](https://crates.io/crates/thrussh_server) and\n [thrussh_client](https://crates.io/crates/thrussh_client) on\n crates.io. More information [here](https://pijul.org/thrussh).","items":[[3,"CryptoBuf","thrussh","A buffer which zeroes its memory on `.clear()`, `.truncate()` and\nreallocations, to avoid copying secrets around.",null,null],[3,"Preferred","","Lists of preferred algorithms. This is normally hard-coded into implementations.",null,null],[12,"kex","","",0,null],[12,"key","","",0,null],[12,"cipher","","",0,null],[12,"mac","","",0,null],[12,"compression","","",0,null],[3,"Limits","","The number of bytes read/written, and the number of seconds before a key re-exchange is requested.",null,null],[12,"rekey_write_limit","","",1,null],[12,"rekey_read_limit","","",1,null],[12,"rekey_time_limit_s","","",1,null],[3,"Channel","","The parameters of a channel.",null,null],[12,"confirmed","","Has the other side confirmed the channel?",2,null],[4,"Error","","",null,null],[13,"CouldNotReadKey","","",3,null],[13,"Base64","","",3,null],[13,"KexInit","","",3,null],[13,"Version","","",3,null],[13,"Kex","","",3,null],[13,"DH","","",3,null],[13,"PacketAuth","","",3,null],[13,"NewKeys","","",3,null],[13,"Inconsistent","","",3,null],[13,"HUP","","",3,null],[13,"IndexOutOfBounds","","",3,null],[13,"Utf8","","",3,null],[13,"UnknownKey","","",3,null],[13,"WrongState","","",3,null],[13,"WrongChannel","","",3,null],[13,"UnknownChannelType","","",3,null],[13,"UnknownSignal","","",3,null],[13,"IO","","",3,null],[13,"Disconnect","","",3,null],[4,"Pty","","",null,null],[13,"TTY_OP_END","","",4,null],[13,"VINTR","","",4,null],[13,"VQUIT","","",4,null],[13,"VERASE","","",4,null],[13,"VKILL","","",4,null],[13,"VEOF","","",4,null],[13,"VEOL","","",4,null],[13,"VEOL2","","",4,null],[13,"VSTART","","",4,null],[13,"VSTOP","","",4,null],[13,"VSUSP","","",4,null],[13,"VDSUSP","","",4,null],[13,"VREPRINT","","",4,null],[13,"VWERASE","","",4,null],[13,"VLNEXT","","",4,null],[13,"VFLUSH","","",4,null],[13,"VSWTCH","","",4,null],[13,"VSTATUS","","",4,null],[13,"VDISCARD","","",4,null],[13,"IGNPAR","","",4,null],[13,"PARMRK","","",4,null],[13,"INPCK","","",4,null],[13,"ISTRIP","","",4,null],[13,"INLCR","","",4,null],[13,"IGNCR","","",4,null],[13,"ICRNL","","",4,null],[13,"IUCLC","","",4,null],[13,"IXON","","",4,null],[13,"IXANY","","",4,null],[13,"IXOFF","","",4,null],[13,"IMAXBEL","","",4,null],[13,"ISIG","","",4,null],[13,"ICANON","","",4,null],[13,"XCASE","","",4,null],[13,"ECHO","","",4,null],[13,"ECHOE","","",4,null],[13,"ECHOK","","",4,null],[13,"ECHONL","","",4,null],[13,"NOFLSH","","",4,null],[13,"TOSTOP","","",4,null],[13,"IEXTEN","","",4,null],[13,"ECHOCTL","","",4,null],[13,"ECHOKE","","",4,null],[13,"PENDIN","","",4,null],[13,"OPOST","","",4,null],[13,"OLCUC","","",4,null],[13,"ONLCR","","",4,null],[13,"OCRNL","","",4,null],[13,"ONOCR","","",4,null],[13,"ONLRET","","",4,null],[13,"CS7","","",4,null],[13,"CS8","","",4,null],[13,"PARENB","","",4,null],[13,"PARODD","","",4,null],[13,"TTY_OP_ISPEED","","",4,null],[13,"TTY_OP_OSPEED","","",4,null],[4,"Disconnect","","A reason for disconnection.",null,null],[13,"HostNotAllowedToConnect","","",5,null],[13,"ProtocolError","","",5,null],[13,"KeyExchangeFailed","","",5,null],[13,"Reserved","","",5,null],[13,"MacError","","",5,null],[13,"CompressionError","","",5,null],[13,"ServiceNotAvailable","","",5,null],[13,"ProtocolVersionNotSupported","","",5,null],[13,"HostKeyNotVerifiable","","",5,null],[13,"ConnectionLost","","",5,null],[13,"ByApplication","","",5,null],[13,"TooManyConnectionss","","",5,null],[13,"AuthCancelledByUser","","",5,null],[13,"NoMoreAuthMethodsAvailable","","",5,null],[13,"IllegalUserName","","",5,null],[4,"Sig","","The type of signals that can be sent to a remote process. If you plan to use custom signals, read [the RFC](https://tools.ietf.org/html/rfc4254#section-6.10) to understand the encoding.",null,null],[13,"ABRT","","",6,null],[13,"ALRM","","",6,null],[13,"FPE","","",6,null],[13,"HUP","","",6,null],[13,"ILL","","",6,null],[13,"INT","","",6,null],[13,"KILL","","",6,null],[13,"PIPE","","",6,null],[13,"QUIT","","",6,null],[13,"SEGV","","",6,null],[13,"TERM","","",6,null],[13,"USR1","","",6,null],[13,"Custom","","",6,null],[4,"ChannelOpenFailure","","Reason for not being able to open a channel.",null,null],[13,"AdministrativelyProhibited","","",7,null],[13,"ConnectFailed","","",7,null],[13,"UnknownChannelType","","",7,null],[13,"ResourceShortage","","",7,null],[5,"load_public_key","","Load a public key from a file. Only ed25519 keys are currently supported.",null,{"inputs":[{"name":"p"}],"output":{"name":"result"}}],[5,"load_secret_key","","Load a secret key from a file. Only ed25519 keys are currently supported.",null,{"inputs":[{"name":"p"}],"output":{"name":"result"}}],[11,"fmt","","",8,null],[11,"index","","",8,null],[11,"write","","",8,null],[11,"flush","","",8,null],[11,"default","","",8,{"inputs":[],"output":{"name":"self"}}],[11,"new","","",8,{"inputs":[],"output":{"name":"cryptobuf"}}],[11,"len","","",8,null],[11,"is_empty","","",8,null],[11,"resize","","",8,null],[11,"clear","","",8,null],[11,"truncate","","",8,null],[11,"push","","",8,null],[11,"push_u32_be","","",8,null],[11,"read_u32_be","","",8,null],[11,"read","","",8,null],[11,"write_all_from","","",8,null],[11,"reserve","","",8,null],[11,"extend","","",8,null],[11,"as_slice","","",8,null],[11,"as_mut_slice","","",8,null],[11,"hexdump","","",8,null],[11,"drop","","",8,null],[11,"fmt","","",0,null],[11,"default","","",0,{"inputs":[],"output":{"name":"preferred"}}],[11,"eq","","",4,null],[11,"clone","","",4,null],[11,"fmt","","",4,null],[11,"from_u8","","",4,{"inputs":[{"name":"u8"}],"output":{"name":"option"}}],[0,"key","","Key generation and use.",null,null],[4,"PublicKey","thrussh::key","",null,null],[4,"Algorithm","","",null,null],[17,"ED25519","","",null,null],[11,"eq","","",9,null],[11,"ne","","",9,null],[11,"clone","","",9,null],[11,"fmt","","",9,null],[11,"clone","","",10,null],[11,"fmt","","",10,null],[11,"public_key","","Copy the public key of this algorithm.",10,null],[11,"generate_keypair","","Generate a key pair.",10,{"inputs":[{"name":"name"}],"output":{"name":"option"}}],[11,"extend_ssh_string","thrussh","",8,null],[11,"extend_ssh_mpint","","",8,null],[11,"extend_list","","",8,null],[11,"write_empty_list","","",8,null],[0,"auth","","",null,null],[3,"M","thrussh::auth","",null,null],[4,"Method","","",null,null],[13,"None","","",11,null],[13,"Password","","",11,null],[12,"user","thrussh::auth::Method","",11,null],[12,"password","","",11,null],[13,"PublicKey","thrussh::auth","",11,null],[12,"user","thrussh::auth::Method","",11,null],[12,"public_key","","",11,null],[13,"Hostbased","thrussh::auth","",11,null],[4,"Answer","","Answer to a request",null,null],[13,"Success","","",12,null],[13,"Reject","","",12,null],[12,"remaining_methods","thrussh::auth::Answer","",12,null],[12,"partial_success","","",12,null],[17,"NONE","thrussh::auth","",null,null],[17,"PASSWORD","","",null,null],[17,"PUBLICKEY","","",null,null],[17,"HOSTBASED","","",null,null],[11,"hash","","",13,null],[11,"cmp","","",13,null],[11,"partial_cmp","","",13,null],[11,"lt","","",13,null],[11,"le","","",13,null],[11,"gt","","",13,null],[11,"ge","","",13,null],[11,"clone","","",13,null],[11,"eq","","",13,null],[11,"ne","","",13,null],[11,"fmt","","",13,null],[11,"empty","","Returns an empty set of flags.",13,{"inputs":[],"output":{"name":"m"}}],[11,"all","","Returns the set containing all flags.",13,{"inputs":[],"output":{"name":"m"}}],[11,"bits","","Returns the raw value of the flags currently stored.",13,null],[11,"from_bits","","Convert from underlying bit representation, unless that\nrepresentation contains bits that do not correspond to a flag.",13,{"inputs":[{"name":"u32"}],"output":{"name":"option"}}],[11,"from_bits_truncate","","Convert from underlying bit representation, dropping any bits\nthat do not correspond to flags.",13,{"inputs":[{"name":"u32"}],"output":{"name":"m"}}],[11,"is_empty","","Returns `true` if no flags are currently stored.",13,null],[11,"is_all","","Returns `true` if all flags are currently set.",13,null],[11,"intersects","","Returns `true` if there are flags common to both `self` and `other`.",13,null],[11,"contains","","Returns `true` all of the flags in `other` are contained within `self`.",13,null],[11,"insert","","Inserts the specified flags in-place.",13,null],[11,"remove","","Removes the specified flags in-place.",13,null],[11,"toggle","","Toggles the specified flags in-place.",13,null],[11,"bitor","","Returns the union of the two sets of flags.",13,null],[11,"bitor_assign","","Adds the set of flags.",13,null],[11,"bitxor","","Returns the left flags, but with all the right flags toggled.",13,null],[11,"bitxor_assign","","Toggles the set of flags.",13,null],[11,"bitand","","Returns the intersection between the two sets of flags.",13,null],[11,"bitand_assign","","Disables all flags disabled in the set.",13,null],[11,"sub","","Returns the set difference of the two sets of flags.",13,null],[11,"sub_assign","","Disables all flags enabled in the set.",13,null],[11,"not","","Returns the complement of this set of flags.",13,null],[11,"extend","","",13,null],[11,"from_iter","","",13,{"inputs":[{"name":"t"}],"output":{"name":"m"}}],[11,"next","","",13,null],[11,"fmt","","",11,null],[11,"num","","",11,null],[11,"from_bytes","","",13,null],[11,"fmt","","",12,null],[0,"server","thrussh","",null,null],[3,"Config","thrussh::server","",null,null],[12,"server_id","","The server ID string sent at the beginning of the protocol.",14,null],[12,"methods","","Authentication methods proposed to the client.",14,null],[12,"auth_banner","","The authentication banner, usually a warning message shown to the client.",14,null],[12,"keys","","The server's keys. The first key pair in the client's preference order will be chosen.",14,null],[12,"limits","","The bytes and time limits before key re-exchange.",14,null],[12,"window_size","","The initial size of a channel (used for flow control).",14,null],[12,"maximum_packet_size","","The maximal size of a single packet.",14,null],[12,"preferred","","Lists of preferred algorithms.",14,null],[3,"Connection","","",null,null],[3,"Session","","",null,null],[11,"fmt","","",14,null],[11,"default","","",14,{"inputs":[],"output":{"name":"config"}}],[11,"fmt","","",15,null],[11,"fmt","","",16,null],[11,"new","","",15,{"inputs":[{"name":"arc"}],"output":{"name":"self"}}],[11,"read","","Process all packets available in the buffer, and returns\nwhether at least one complete packet was read. `buffer` and `buffer2` are work spaces mostly used to compute keys. They are cleared before using, hence nothing is expected from them.",15,null],[11,"write","","Write all computed packets to the stream. Returns whether all packets have been sent.",15,null],[11,"disconnect","","Sends a disconnect message.",16,null],[11,"request_success","","Send a "success" reply to a /global/ request (requests without a channel number, such as TCP/IP forwarding or cancelling). Always call this function if the request was successful (it checks whether the client expects an answer).",16,null],[11,"request_failure","","Send a "failure" reply to a global request.",16,null],[11,"channel_success","","Send a "success" reply to a channel request. Always call this function if the request was successful (it checks whether the client expects an answer).",16,null],[11,"channel_failure","","Send a "failure" reply to a global request.",16,null],[11,"channel_open_failure","","Send a "failure" reply to a request to open a channel open.",16,null],[11,"data","","Send data to a channel. On session channels, `extended` can be used to encode standard error by passing `Some(1)`, and stdout by passing `None`.",16,null],[11,"xon_xoff_request","","Inform the client of whether they may perform control-S/control-Q flow control. See [RFC4254](https://tools.ietf.org/html/rfc4254#section-6.8).",16,null],[11,"exit_status_request","","Send the exit status of a program.",16,null],[11,"exit_signal_request","","If the program was killed by a signal, send the details about the signal to the client.",16,null],[11,"channel_open_forwarded_tcpip","","Open a TCP/IP forwarding channel, when a connection comes to a local port for which forwarding has been requested. See [RFC4254](https://tools.ietf.org/html/rfc4254#section-7). The TCP/IP packets can then be tunneled through the channel using `.data()`.",16,null],[0,"client","thrussh","",null,null],[3,"Config","thrussh::client","",null,null],[12,"client_id","","The client ID string sent at the beginning of the protocol.",17,null],[12,"limits","","The bytes and time limits before key re-exchange.",17,null],[12,"window_size","","The initial size of a channel (used for flow control).",17,null],[12,"maximum_packet_size","","The maximal size of a single packet.",17,null],[12,"preferred","","Lists of preferred algorithms.",17,null],[3,"Connection","","Client connection.",null,null],[12,"session","","",18,null],[3,"Session","","",null,null],[11,"fmt","","",17,null],[11,"default","","",17,{"inputs":[],"output":{"name":"config"}}],[11,"fmt","","",18,null],[11,"fmt","","",19,null],[11,"new","","",18,{"inputs":[{"name":"arc"}],"output":{"name":"self"}}],[11,"read","","Process all packets available in the buffer, and returns\nwhether at least one complete packet was read.\n`buffer` and `buffer2` are work spaces mostly used to compute keys. They are cleared before using, hence nothing is expected from them.",18,null],[11,"write","","Write all computed packets to the stream. Returns whether all packets have been sent.",18,null],[11,"disconnect","","Sends a disconnect message.",19,null],[11,"set_auth_public_key","","Set the authentication method.",19,null],[11,"set_auth_password","","Set the authentication method.",19,null],[11,"is_authenticated","","Whether the client is authenticated.",19,null],[11,"needs_auth_method","","Tests whether we need an authentication method (for instance if the last attempt failed).",19,null],[11,"valid_auth_methods","","Returns the set of authentication methods that can continue, or None if this is not valid.",19,null],[11,"channels","","Set of all channels requested during this connection, and not closed.",19,null],[11,"channel_open_session","","Request a session channel (the most basic type of\nchannel). This function returns `Some(..)` immediately if the\nconnection is authenticated, but the channel only becomes\nusable when it's confirmed by the server, as indicated by the\n`confirmed` field of the corresponding `Channel`.",19,null],[11,"channel_open_x11","","Request an X11 channel, on which the X11 protocol may be tunneled.",19,null],[11,"channel_open_direct_tcpip","","Open a TCP/IP forwarding channel. This is usually done when a connection comes to a locally forwarded TCP/IP port. See [RFC4254](https://tools.ietf.org/html/rfc4254#section-7). The TCP/IP packets can then be tunneled through the channel using `.data()`.",19,null],[11,"data","","Send data or "extended data" to the given channel. Extended data can be used to multiplex different data streams into a single channel.",19,null],[11,"request_pty","","Request a pseudo-terminal with the given characteristics.",19,null],[11,"request_x11","","Request X11 forwarding through an already opened X11 channel. See [RFC4254](https://tools.ietf.org/html/rfc4254#section-6.3.1) for security issues related to cookies.",19,null],[11,"set_env","","Set a remote environment variable.",19,null],[11,"request_shell","","Request a remote shell.",19,null],[11,"exec","","Execute a remote program (will be passed to a shell). This can be used to implement scp (by calling a remote scp and tunneling to its standard input).",19,null],[11,"signal","","Signal a remote process.",19,null],[11,"request_subsystem","","Request the start of a subsystem with the given name.",19,null],[11,"window_change","","Inform the server that our window size has changed.",19,null],[11,"tcpip_forward","","Request the forwarding of a remote port to the client. The server will then open forwarding channels (which cause the client to call `.channel_open_forwarded_tcpip()`).",19,null],[11,"cancel_tcpip_forward","","Cancel a previous forwarding request.",19,null],[8,"Server","thrussh","",null,null],[11,"auth","","Called to check authentication requests.",20,null],[11,"channel_open_session","","Called when a new channel is created.",20,null],[11,"channel_open_x11","","Called when a new X11 channel is created.",20,null],[11,"channel_open_direct_tcpip","","Called when a new channel is created.",20,null],[11,"data","","Called when a data packet is received. A response can be\nwritten to the `response` argument.",20,null],[11,"extended_data","","Called when an extended data packet is received. Code 1 means\nthat this packet comes from stderr, other codes are not\ndefined (see [RFC4254](https://tools.ietf.org/html/rfc4254#section-5.2)).",20,null],[11,"window_adjusted","","Called when the network window is adjusted, meaning that we can send more bytes.",20,null],[11,"pty_request","","The client requests a pseudo-terminal with the given specifications.",20,null],[11,"x11_request","","The client requests an X11 connection.",20,null],[11,"env_request","","The client wants to set the given environment variable. Check\nthese carefully, as it is dangerous to allow any variable\nenvironment to be set.",20,null],[11,"shell_request","","The client requests a shell.",20,null],[11,"exec_request","","The client sends a command to execute, to be passed to a shell. Make sure to check the command before doing so.",20,null],[11,"subsystem_request","","The client asks to start the subsystem with the given name (such as sftp).",20,null],[11,"window_change_request","","The client's pseudo-terminal window size has changed.",20,null],[11,"signal","","The client is sending a signal (usually to pass to the currently running process).",20,null],[11,"tcpip_forward","","Used for reverse-forwarding ports, see [RFC4254](https://tools.ietf.org/html/rfc4254#section-7).",20,null],[11,"cancel_tcpip_forward","","Used to stop the reverse-forwarding of a port, see [RFC4254](https://tools.ietf.org/html/rfc4254#section-7).",20,null],[8,"Client","","",null,null],[11,"auth_banner","","Called when the server sends us an authentication banner. This is usually meant to be shown to the user, see [RFC4252](https://tools.ietf.org/html/rfc4252#section-5.4) for more details.",21,null],[11,"check_server_key","","Called to check the server's public key. This is a very important\nstep to help prevent man-in-the-middle attacks. The default\nimplementation rejects all keys.",21,null],[11,"channel_open_confirmation","","Called when the server confirmed our request to open a channel. A channel can only be written to after receiving this message (this library panics otherwise).",21,null],[11,"channel_open_failure","","Called when the server rejected our request to open a channel.",21,null],[11,"channel_open_forwarded_tcpip","","Called when a new channel is created.",21,null],[11,"data","","Called when the server sends us data. The `extended_code` parameter is a stream identifier, `None` is usually the standard output, and `Some(1)` is the standard error. See [RFC4254](https://tools.ietf.org/html/rfc4254#section-5.2).",21,null],[11,"xon_xoff","","The server informs this client of whether the client may perform control-S/control-Q flow control. See [RFC4254](https://tools.ietf.org/html/rfc4254#section-6.8).",21,null],[11,"exit_status","","The remote process has exited, with the given exit status.",21,null],[11,"exit_signal","","The remote process exited upon receiving a signal.",21,null],[11,"window_adjusted","","Called when the network window is adjusted, meaning that we\ncan send more bytes. This is useful if this client wants to\nsend huge amounts of data, for instance if we have called\n`client::Session::data` before, and it returned less than the\nfull amount of data.",21,null],[11,"fmt","","",3,null],[11,"from","","",3,{"inputs":[{"name":"error"}],"output":{"name":"error"}}],[11,"from","","",3,{"inputs":[{"name":"utf8error"}],"output":{"name":"error"}}],[11,"from","","",3,{"inputs":[{"name":"frombase64error"}],"output":{"name":"error"}}],[11,"clone","","",1,null],[11,"fmt","","",1,null],[11,"clone","","",6,null],[11,"fmt","","",6,null],[11,"eq","","",7,null],[11,"clone","","",7,null],[11,"fmt","","",7,null],[11,"fmt","","",2,null]],"paths":[[3,"Preferred"],[3,"Limits"],[3,"Channel"],[4,"Error"],[4,"Pty"],[4,"Disconnect"],[4,"Sig"],[4,"ChannelOpenFailure"],[3,"CryptoBuf"],[4,"PublicKey"],[4,"Algorithm"],[4,"Method"],[4,"Answer"],[3,"M"],[3,"Config"],[3,"Connection"],[3,"Session"],[3,"Config"],[3,"Connection"],[3,"Session"],[8,"Server"],[8,"Client"]]}; initSearch(searchIndex);