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\ncrates.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","","",1,null],[4,"Error","","",null,null],[13,"CouldNotReadKey","","",2,null],[13,"Base64","","",2,null],[13,"KexInit","","",2,null],[13,"Version","","",2,null],[13,"Kex","","",2,null],[13,"PacketAuth","","",2,null],[13,"NewKeys","","",2,null],[13,"Inconsistent","","",2,null],[13,"IndexOutOfBounds","","",2,null],[13,"Utf8","","",2,null],[13,"UnknownKey","","",2,null],[13,"WrongChannel","","",2,null],[13,"UnknownChannelType","","",2,null],[13,"UnknownSignal","","",2,null],[13,"IO","","",2,null],[13,"Disconnect","","",2,null],[13,"NoHomeDir","","",2,null],[13,"KeyChanged","","",2,null],[13,"HUP","","",2,null],[4,"Pty","","",null,null],[13,"TTY_OP_END","","",3,null],[13,"VINTR","","",3,null],[13,"VQUIT","","",3,null],[13,"VERASE","","",3,null],[13,"VKILL","","",3,null],[13,"VEOF","","",3,null],[13,"VEOL","","",3,null],[13,"VEOL2","","",3,null],[13,"VSTART","","",3,null],[13,"VSTOP","","",3,null],[13,"VSUSP","","",3,null],[13,"VDSUSP","","",3,null],[13,"VREPRINT","","",3,null],[13,"VWERASE","","",3,null],[13,"VLNEXT","","",3,null],[13,"VFLUSH","","",3,null],[13,"VSWTCH","","",3,null],[13,"VSTATUS","","",3,null],[13,"VDISCARD","","",3,null],[13,"IGNPAR","","",3,null],[13,"PARMRK","","",3,null],[13,"INPCK","","",3,null],[13,"ISTRIP","","",3,null],[13,"INLCR","","",3,null],[13,"IGNCR","","",3,null],[13,"ICRNL","","",3,null],[13,"IUCLC","","",3,null],[13,"IXON","","",3,null],[13,"IXANY","","",3,null],[13,"IXOFF","","",3,null],[13,"IMAXBEL","","",3,null],[13,"ISIG","","",3,null],[13,"ICANON","","",3,null],[13,"XCASE","","",3,null],[13,"ECHO","","",3,null],[13,"ECHOE","","",3,null],[13,"ECHOK","","",3,null],[13,"ECHONL","","",3,null],[13,"NOFLSH","","",3,null],[13,"TOSTOP","","",3,null],[13,"IEXTEN","","",3,null],[13,"ECHOCTL","","",3,null],[13,"ECHOKE","","",3,null],[13,"PENDIN","","",3,null],[13,"OPOST","","",3,null],[13,"OLCUC","","",3,null],[13,"ONLCR","","",3,null],[13,"OCRNL","","",3,null],[13,"ONOCR","","",3,null],[13,"ONLRET","","",3,null],[13,"CS7","","",3,null],[13,"CS8","","",3,null],[13,"PARENB","","",3,null],[13,"PARODD","","",3,null],[13,"TTY_OP_ISPEED","","",3,null],[13,"TTY_OP_OSPEED","","",3,null],[4,"Disconnect","","A reason for disconnection.",null,null],[13,"HostNotAllowedToConnect","","",4,null],[13,"ProtocolError","","",4,null],[13,"KeyExchangeFailed","","",4,null],[13,"Reserved","","",4,null],[13,"MacError","","",4,null],[13,"CompressionError","","",4,null],[13,"ServiceNotAvailable","","",4,null],[13,"ProtocolVersionNotSupported","","",4,null],[13,"HostKeyNotVerifiable","","",4,null],[13,"ConnectionLost","","",4,null],[13,"ByApplication","","",4,null],[13,"TooManyConnectionss","","",4,null],[13,"AuthCancelledByUser","","",4,null],[13,"NoMoreAuthMethodsAvailable","","",4,null],[13,"IllegalUserName","","",4,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","","",5,null],[13,"ALRM","","",5,null],[13,"FPE","","",5,null],[13,"HUP","","",5,null],[13,"ILL","","",5,null],[13,"INT","","",5,null],[13,"KILL","","",5,null],[13,"PIPE","","",5,null],[13,"QUIT","","",5,null],[13,"SEGV","","",5,null],[13,"TERM","","",5,null],[13,"USR1","","",5,null],[13,"Custom","","",5,null],[4,"ChannelOpenFailure","","Reason for not being able to open a channel.",null,null],[13,"AdministrativelyProhibited","","",6,null],[13,"ConnectFailed","","",6,null],[13,"UnknownChannelType","","",6,null],[13,"ResourceShortage","","",6,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,"parse_public_key_base64","","Reads a public key from the standard encoding. In some cases, the\nencoding is prefixed with a key type identifier and a space (such\nas `ssh-ed25519 AAAAC3N...`).",null,{"inputs":[{"name":"str"}],"output":{"name":"result"}}],[5,"parse_public_key","","",null,null],[5,"write_public_key_base64","","",null,{"inputs":[{"name":"w"},{"name":"publickey"}],"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"}}],[5,"learn_known_hosts_path","","Record a host's public key into a nonstandard location.",null,{"inputs":[{"name":"str"},{"name":"u16"},{"name":"publickey"},{"name":"p"}],"output":{"name":"result"}}],[5,"check_known_hosts_path","","",null,{"inputs":[{"name":"str"},{"name":"u16"},{"name":"publickey"},{"name":"p"}],"output":{"name":"result"}}],[11,"fmt","","",7,null],[11,"deref","","",7,null],[11,"deref_mut","","",7,null],[11,"index","","",7,null],[11,"index","","",7,null],[11,"index","","",7,null],[11,"index_mut","","",7,null],[11,"index_mut","","",7,null],[11,"index_mut","","",7,null],[11,"index","","",7,null],[11,"write","","",7,null],[11,"flush","","",7,null],[11,"default","","",7,{"inputs":[],"output":{"name":"self"}}],[11,"new","","",7,{"inputs":[],"output":{"name":"cryptobuf"}}],[11,"len","","",7,null],[11,"is_empty","","",7,null],[11,"resize","","",7,null],[11,"clear","","",7,null],[11,"truncate","","",7,null],[11,"push","","",7,null],[11,"push_u32_be","","",7,null],[11,"read_u32_be","","",7,null],[11,"read","","",7,null],[11,"write_all_from","","",7,null],[11,"reserve","","",7,null],[11,"extend","","",7,null],[11,"hexdump","","",7,null],[11,"drop","","",7,null],[11,"fmt","","",0,null],[11,"default","","",0,{"inputs":[],"output":{"name":"preferred"}}],[11,"eq","","",3,null],[11,"clone","","",3,null],[11,"fmt","","",3,null],[11,"from_u8","","",3,{"inputs":[{"name":"u8"}],"output":{"name":"option"}}],[0,"key","","Key generation and use.",null,null],[3,"Name","thrussh::key","",null,null],[4,"PublicKey","","",null,null],[4,"Algorithm","","",null,null],[17,"ED25519","","",null,null],[11,"clone","","",8,null],[11,"eq","","",8,null],[11,"ne","","",8,null],[11,"fmt","","",8,null],[11,"as_ref","","",8,null],[11,"identity_file","","Base name of the private key file for a key name.",8,null],[11,"eq","","",9,null],[11,"ne","","",9,null],[11,"clone","","",9,null],[11,"fmt","","",9,null],[11,"deref","","",9,null],[11,"fingerprint","","",9,null],[11,"clone","","",10,null],[11,"fmt","","",10,null],[11,"clone_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"}}],[0,"kex","thrussh","",null,null],[3,"Name","thrussh::kex","",null,null],[17,"CURVE25519","","",null,null],[11,"clone","","",11,null],[11,"eq","","",11,null],[11,"ne","","",11,null],[11,"fmt","","",11,null],[11,"as_ref","","",11,null],[0,"cipher","thrussh","",null,null],[3,"Name","thrussh::cipher","",null,null],[3,"CipherPair","","",null,null],[12,"local_to_remote","","",12,null],[12,"remote_to_local","","",12,null],[3,"Clear","","",null,null],[4,"Cipher","","",null,null],[13,"Clear","","",13,null],[13,"Chacha20Poly1305","","",13,null],[5,"key_size","","",null,{"inputs":[{"name":"name"}],"output":{"name":"usize"}}],[0,"chacha20poly1305","","",null,null],[3,"Cipher","thrussh::cipher::chacha20poly1305","",null,null],[11,"fmt","","",14,null],[11,"init","","",14,null],[11,"read","","",14,null],[11,"write","","Append an encrypted packet with contents `packet_content` at the end of `buffer`.",14,null],[17,"CHACHA20POLY1305","thrussh::cipher","",null,null],[17,"CLEAR_PAIR","","",null,null],[8,"CipherT","","",null,null],[10,"read","","Replace the buffer's content with the next deciphered packet from `stream`.",15,null],[10,"write","","Extend the buffer with the encrypted packet.",15,null],[11,"fmt","","",13,null],[11,"clone","","",16,null],[11,"eq","","",16,null],[11,"ne","","",16,null],[11,"fmt","","",16,null],[11,"as_ref","","",16,null],[11,"fmt","","",12,null],[11,"read","","",13,null],[11,"write","","",13,null],[11,"read","","",17,null],[11,"write","","",17,null],[11,"disconnect","","",17,null],[11,"read","","",12,null],[11,"write","","",12,null],[11,"extend_ssh_string","thrussh","",7,null],[11,"extend_ssh_mpint","","",7,null],[11,"extend_list","","",7,null],[11,"write_empty_list","","",7,null],[0,"server","","",null,null],[3,"Config","thrussh::server","",null,null],[12,"server_id","","The server ID string sent at the beginning of the protocol.",18,null],[12,"methods","","Authentication methods proposed to the client.",18,null],[12,"auth_banner","","The authentication banner, usually a warning message shown to the client.",18,null],[12,"auth_rejection_time","","Authentication rejections must happen in constant time for security reasons.",18,null],[12,"keys","","The server's keys. The first key pair in the client's preference order will be chosen.",18,null],[12,"limits","","The bytes and time limits before key re-exchange.",18,null],[12,"window_size","","The initial size of a channel (used for flow control).",18,null],[12,"maximum_packet_size","","The maximal size of a single packet.",18,null],[12,"preferred","","Lists of preferred algorithms.",18,null],[3,"Connection","","",null,null],[3,"Session","","",null,null],[8,"Handler","","",null,null],[11,"auth_none","","Check authentication using the "none" method. Thrussh makes\nsure rejection happens in time `config.auth_rejection_time`,\nexcept if this method takes more than that.",19,null],[11,"auth_password","","Check authentication using the "password" method. Thrussh\nmakes sure rejection happens in time\n`config.auth_rejection_time`, except if this method takes more\nthan that.",19,null],[11,"auth_publickey","","Check authentication using the "publickey" method. Thrussh\nmakes sure rejection happens in time\n`config.auth_rejection_time`, except if this method takes more\nthan that.",19,null],[11,"channel_close","","Called when the client closes a channel.",19,null],[11,"channel_eof","","Called when the client sends EOF to a channel.",19,null],[11,"channel_open_session","","Called when a new session channel is created.",19,null],[11,"channel_open_x11","","Called when a new X11 channel is created.",19,null],[11,"channel_open_direct_tcpip","","Called when a new channel is created.",19,null],[11,"data","","Called when a data packet is received. A response can be\nwritten to the `response` argument.",19,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)).",19,null],[11,"window_adjusted","","Called when the network window is adjusted, meaning that we can send more bytes.",19,null],[11,"pty_request","","The client requests a pseudo-terminal with the given specifications.",19,null],[11,"x11_request","","The client requests an X11 connection.",19,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.",19,null],[11,"shell_request","","The client requests a shell.",19,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.",19,null],[11,"subsystem_request","","The client asks to start the subsystem with the given name (such as sftp).",19,null],[11,"window_change_request","","The client's pseudo-terminal window size has changed.",19,null],[11,"signal","","The client is sending a signal (usually to pass to the currently running process).",19,null],[11,"tcpip_forward","","Used for reverse-forwarding ports, see [RFC4254](https://tools.ietf.org/html/rfc4254#section-7).",19,null],[11,"cancel_tcpip_forward","","Used to stop the reverse-forwarding of a port, see [RFC4254](https://tools.ietf.org/html/rfc4254#section-7).",19,null],[11,"fmt","","",18,null],[11,"default","","",18,{"inputs":[],"output":{"name":"config"}}],[11,"fmt","","",20,null],[11,"fmt","","",21,null],[11,"deref","","",20,null],[11,"deref_mut","","",20,null],[11,"new","","",20,{"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.",20,null],[11,"write","","Write all computed packets to the stream. Returns whether all packets have been sent.",20,null],[11,"config","","Retrieves the configuration of this session.",21,null],[11,"disconnect","","Sends a disconnect message.",21,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).",21,null],[11,"request_failure","","Send a "failure" reply to a global request.",21,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).",21,null],[11,"channel_failure","","Send a "failure" reply to a global request.",21,null],[11,"channel_open_failure","","Send a "failure" reply to a request to open a channel open.",21,null],[11,"close","","Close a channel.",21,null],[11,"eof","","Send EOF to a channel",21,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`.",21,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).",21,null],[11,"exit_status_request","","Send the exit status of a program.",21,null],[11,"exit_signal_request","","If the program was killed by a signal, send the details about the signal to the client.",21,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()`.",21,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.",22,null],[12,"limits","","The bytes and time limits before key re-exchange.",22,null],[12,"window_size","","The initial size of a channel (used for flow control).",22,null],[12,"maximum_packet_size","","The maximal size of a single packet.",22,null],[12,"preferred","","Lists of preferred algorithms.",22,null],[3,"Connection","","Client connection.",null,null],[12,"session","","",23,null],[3,"Session","","",null,null],[8,"Handler","","",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.",24,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.",24,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).",24,null],[11,"channel_close","","Called when the server closes a channel.",24,null],[11,"channel_eof","","Called when the server sends EOF to a channel.",24,null],[11,"channel_open_failure","","Called when the server rejected our request to open a channel.",24,null],[11,"channel_open_forwarded_tcpip","","Called when a new channel is created.",24,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).",24,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).",24,null],[11,"exit_status","","The remote process has exited, with the given exit status.",24,null],[11,"exit_signal","","The remote process exited upon receiving a signal.",24,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`Session::data` before, and it returned less than the\nfull amount of data.",24,null],[11,"fmt","","",22,null],[11,"default","","",22,{"inputs":[],"output":{"name":"config"}}],[11,"fmt","","",23,null],[11,"deref","","",23,null],[11,"deref_mut","","",23,null],[11,"fmt","","",25,null],[11,"new","","",23,{"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.",23,null],[11,"write","","Write all computed packets to the stream. Returns whether all packets have been sent.",23,null],[11,"config","","Retrieves the configuration of this session.",25,null],[11,"auth_user","","Retrieves the current user.",25,null],[11,"disconnect","","Sends a disconnect message.",25,null],[11,"set_auth_user","","Set the user.",25,null],[11,"set_auth_public_key","","Set the authentication method.",25,null],[11,"set_auth_password","","Set the authentication method.",25,null],[11,"is_authenticated","","Whether the client is authenticated.",25,null],[11,"channel_is_open","","Check whether a channel has been confirmed.",25,null],[11,"has_auth_method","","Tests whether we need an authentication method (for instance if the last attempt failed).",25,null],[11,"valid_auth_methods","","Returns the set of authentication methods that can continue, or None if this is not valid.",25,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`.",25,null],[11,"channel_open_x11","","Request an X11 channel, on which the X11 protocol may be tunneled.",25,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()`.",25,null],[11,"close","","Close a channel.",25,null],[11,"eof","","Send EOF to a channel",25,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.",25,null],[11,"request_pty","","Request a pseudo-terminal with the given characteristics.",25,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.",25,null],[11,"set_env","","Set a remote environment variable.",25,null],[11,"request_shell","","Request a remote shell.",25,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).",25,null],[11,"signal","","Signal a remote process.",25,null],[11,"request_subsystem","","Request the start of a subsystem with the given name.",25,null],[11,"window_change","","Inform the server that our window size has changed.",25,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()`).",25,null],[11,"cancel_tcpip_forward","","Cancel a previous forwarding request.",25,null],[11,"fmt","thrussh","",2,null],[11,"fmt","","",2,null],[11,"description","","",2,null],[11,"cause","","",2,null],[11,"from","","",2,{"inputs":[{"name":"error"}],"output":{"name":"error"}}],[11,"from","","",2,{"inputs":[{"name":"utf8error"}],"output":{"name":"error"}}],[11,"from","","",2,{"inputs":[{"name":"frombase64error"}],"output":{"name":"error"}}],[11,"clone","","",1,null],[11,"fmt","","",1,null],[11,"default","","",1,{"inputs":[],"output":{"name":"self"}}],[11,"clone","","",5,null],[11,"fmt","","",5,null],[11,"eq","","",6,null],[11,"clone","","",6,null],[11,"fmt","","",6,null]],"paths":[[3,"Preferred"],[3,"Limits"],[4,"Error"],[4,"Pty"],[4,"Disconnect"],[4,"Sig"],[4,"ChannelOpenFailure"],[3,"CryptoBuf"],[3,"Name"],[4,"PublicKey"],[4,"Algorithm"],[3,"Name"],[3,"CipherPair"],[4,"Cipher"],[3,"Cipher"],[8,"CipherT"],[3,"Name"],[3,"Clear"],[3,"Config"],[8,"Handler"],[3,"Connection"],[3,"Session"],[3,"Config"],[3,"Connection"],[8,"Handler"],[3,"Session"]]}; initSearch(searchIndex);