summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/clientloop.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* client: switch to sshbuf API; ok djm@markus2018-07-091-2/+2
|
* Expose devices allocated for tun/tap forwarding.djm2017-10-231-2/+2
| | | | | | | | | | | At the client, the device may be obtained from a new %T expansion for LocalCommand. At the server, the allocated devices will be listed in a SSH_TUNNEL variable exposed to the environment of any user sessions started after the tunnel forwarding was established. ok markus
* refactor channels.cdjm2017-09-121-14/+17
| | | | | | | | | | | | | | | | | | Move static state to a "struct ssh_channels" that is allocated at runtime and tracked as a member of struct ssh. Explicitly pass "struct ssh" to all channels functions. Replace use of the legacy packet APIs in channels.c. Rework sshd_config PermitOpen handling: previously the configuration parser would call directly into the channels layer. After the refactor this is not possible, as the channels structures are allocated at connection time and aren't available when the configuration is parsed. The server config parser now tracks PermitOpen itself and explicitly configures the channels code later. ok markus@
* ssh proxy mux mode (-O proxy; idea from Simon Tatham):markus2016-09-301-2/+3
| | | | | | | | | - mux client speaks the ssh-packet protocol directly over unix-domain socket. - mux server acts as a proxy, translates channel IDs and relays to the server. - no filedescriptor passing necessary. - combined with unix-domain forwarding it's even possible to run mux client and server on different machines. feedback & ok djm@
* eliminate fallback from untrusted X11 forwarding to trusteddjm2016-01-131-2/+2
| | | | | forwarding when the X server disables the SECURITY extension; Reported by Thomas Hoger; ok deraadt@
* No need for the mux cleanup callback to be visible so restore it to staticdtucker2013-06-021-2/+1
| | | | and call it through the detach_user function pointer. ok djm@
* Force a clean shutdown of ControlMaster client sessions when the ~. escapedtucker2012-08-171-1/+2
| | | | | sequence is used. This means that ~. should now work in mux clients even if the server is no longer responding. Found by tedu, ok djm.
* support for cancelling local and remote port forwards via the multiplexdjm2011-09-091-1/+2
| | | | | socket. Use ssh -O cancel -L xx:xx:xx -R yy:yy:yy user@host" to request the cancellation of the specified forwardings; ok markus@
* hook up a channel confirm callback to warn the user then requested X11djm2011-06-221-1/+5
| | | | forwarding was refused by the server; ok markus@
* improve our behaviour when TTY allocation fails: if we are indjm2011-05-081-1/+3
| | | | | | | | | | | | RequestTTY=auto mode (the default), then do not treat at TTY allocation error as fatal but rather just restore the local TTY to cooked mode and continue. This is more graceful on devices that never allocate TTYs. If RequestTTY is set to "yes" or "force", then failure to allocate a TTY is fatal. ok markus@
* allow graceful shutdown of multiplexing: request that a mux server removesdjm2011-04-171-1/+3
| | | | its listener socket and refuse future multiplexing requests; ok markus@
* Add X11ForwardTimeout option to specify timeout for untrusted X11djm2010-06-251-2/+2
| | | | | | | | | | | authentication cookies to avoid fallback in X11 code to fully-trusted implicit authentication using SO_PEERCRED described at: http://lists.x.org/archives/xorg-devel/2010-May/008636.html After the X11ForwardTimeout has expired the client will now refuse incoming X11 channel opens. based on patch from Tavis Ormandy; "nice" markus@
* mux support for remote forwarding with dynamic port allocation,markus2010-05-161-1/+2
| | | | | | use with LPORT=`ssh -S muxsocket -R0:localhost:25 -O forward somehost` feedback and ok djm@
* rewrite ssh(1) multiplexing code to a more sensible protocol.djm2010-01-261-8/+4
| | | | | | | | | | | | | | | | | | | | | | The new multiplexing code uses channels for the listener and accepted control sockets to make the mux master non-blocking, so no stalls when processing messages from a slave. avoid use of fatal() in mux master protocol parsing so an errant slave process cannot take down a running master. implement requesting of port-forwards over multiplexed sessions. Any port forwards requested by the slave are added to those the master has established. add support for stdio forwarding ("ssh -W host:port ...") in mux slaves. document master/slave mux protocol so that other tools can use it to control a running ssh(1). Note: there are no guarantees that this protocol won't be incompatibly changed (though it is versioned). feedback Salvador Fandino, dtucker@ channel changes ok markus@
* The multiplexing escape char handler commit last night introduced adjm2008-06-121-1/+2
| | | | small memory leak per session; plug it.
* maintain an ordered queue of outstanding global requests that wedjm2008-06-121-1/+5
| | | | | | | | | expect replies to, similar to the per-channel confirmation queue. Use this queue to verify success or failure for remote forward establishment in a race free way. ok dtucker@
* Enable ~ escapes for multiplex slave sessions; give each channeldjm2008-06-121-16/+6
| | | | | | | | | | | | | its own escape state and hook the escape filters up to muxed channels. bz #1331 Mux slaves do not currently support the ~^Z and ~& escapes. NB. this change cranks the mux protocol version, so a new ssh mux client will not be able to connect to a running old ssh mux master. ok dtucker@
* tidy up session multiplexing code, moving it into its own file anddjm2008-05-091-1/+19
| | | | | | | making the function names more consistent - making ssh.c and clientloop.c a fair bit more readable. ok markus@
* Use new channel status confirmation callback system to properly dealdjm2008-05-081-2/+2
| | | | | | | | | | | | | | with "important" channel requests that fail, in particular command exec, shell and subsystem requests. Previously we would optimistically assume that the requests would always succeed, which could cause hangs if they did not (e.g. when the server runs out of fds) or were unimplemented by the server (bz #1384) Also, properly report failing multiplex channel requests via the mux client stderr (subject to LogLevel in the mux master) - better than silently failing. most bits ok markus@ (as part of a larger diff)
* bz#1232: ensure that any specified LocalCommand is executed after thedjm2007-08-071-1/+2
| | | | | | tunnel device is opened. Also, make failures to open a tunnel device fatal when ExitOnForwardFailure is active. Reported by h.goebel AT goebel-consult.de; ok dtucker markus reyk deraadt
* standardise spacing in $OpenBSD$ tags; requested by deraadt@djm2006-03-251-1/+1
|
* move #include <termios.h> out of includes.h; ok markus@stevesk2006-02-071-1/+3
|
* implement support for X11 and agent forwarding over multiplex slavedjm2005-07-041-1/+6
| | | | | | | | connections. Because of protocol limitations, the slave connections inherit the master's DISPLAY and SSH_AUTH_SOCK rather than distinctly forwarding their own. ok dtucker@ "put it in" deraadt@
* move x11_get_proto from ssh.c to clientloop.c, to make muliplexed xfwd easierdjm2005-06-161-1/+3
| | | | later; ok deraadt@
* add basic control of a running multiplex master connection; including thedjm2004-11-071-1/+9
| | | | ability to check its status and request it to exit; ok markus@
* spacesderaadt2004-07-111-2/+2
|
* support environment passing over shared connections; ok markus@djm2004-06-171-2/+2
|
* implement session multiplexing in the client (the server has supported thisdjm2004-06-131-1/+3
| | | | since 2.0); ok markus@
* application layer keep alive (ServerAliveInterval ServerAliveCountMax)markus2003-12-161-2/+2
| | | | | for ssh(1), similar to the sshd(8) option; ok beck@; with help from jmc and dtucker@
* request reply (success/failure) for -R style fwd in protocol v2,markus2002-04-221-1/+2
| | | | | depends on ordered replies. fixes http://bugzilla.mindrot.org/show_bug.cgi?id=215; ok provos@
* remove comments from .h, since they are cut&paste from the .c filesmarkus2001-06-261-2/+2
| | | | and out of sync
* prototype pedant. not very creative...itojun2001-06-261-2/+2
| | | | | - () -> (void) - no variable names
* remove confusing callback codemarkus2001-02-061-3/+1
|
* $OpenBSD$niklas2001-01-291-0/+2
|
* split ssh.h and try to cleanup the #include mess. remove unnecessary #includes.markus2001-01-211-0/+15
| | | | rename util.[ch] -> misc.[ch]
* move callback to headerfilemarkus2001-01-131-0/+24