summaryrefslogtreecommitdiff
path: root/sshd.8
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2006-03-15 11:35:54 +1100
committerDamien Miller <djm@mindrot.org>2006-03-15 11:35:54 +1100
commitfd725cf585d0f9aca648f177df35265b6abc10e6 (patch)
treee5834aeae76a9f7206e1809ae9e5dcf7d154cc44 /sshd.8
parentadc35b9583944203906ef1fd8b078316213e35d5 (diff)
- jmc@cvs.openbsd.org 2006/02/19 19:52:10
[sshd.8] move the sshrc stuff out of FILES, and into its own section: FILES is not a good place to document how stuff works;
Diffstat (limited to 'sshd.8')
-rw-r--r--sshd.895
1 files changed, 51 insertions, 44 deletions
diff --git a/sshd.8 b/sshd.8
index 6d79f175c..6df9d8aab 100644
--- a/sshd.8
+++ b/sshd.8
@@ -34,7 +34,7 @@
34.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 34.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
35.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 35.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36.\" 36.\"
37.\" $OpenBSD: sshd.8,v 1.225 2006/02/16 09:05:34 jmc Exp $ 37.\" $OpenBSD: sshd.8,v 1.226 2006/02/19 19:52:10 jmc Exp $
38.Dd September 25, 1999 38.Dd September 25, 1999
39.Dt SSHD 8 39.Dt SSHD 8
40.Os 40.Os
@@ -370,9 +370,54 @@ The
370.Dq rc 370.Dq rc
371files are given the X11 371files are given the X11
372authentication protocol and cookie in standard input. 372authentication protocol and cookie in standard input.
373See
374.Sx SSHRC ,
375below.
373.It 376.It
374Runs user's shell or command. 377Runs user's shell or command.
375.El 378.El
379.Sh SSHRC
380If the file
381.Pa ~/.ssh/rc
382exists,
383.Xr sh 1
384runs it after reading the
385environment files but before starting the user's shell or command.
386It must not produce any output on stdout; stderr must be used
387instead.
388If X11 forwarding is in use, it will receive the "proto cookie" pair in
389its standard input (and
390.Ev DISPLAY
391in its environment).
392The script must call
393.Xr xauth 1
394because
395.Nm
396will not run xauth automatically to add X11 cookies.
397.Pp
398The primary purpose of this file is to run any initialization routines
399which may be needed before the user's home directory becomes
400accessible; AFS is a particular example of such an environment.
401.Pp
402This file will probably contain some initialization code followed by
403something similar to:
404.Bd -literal -offset 3n
405if read proto cookie && [ -n "$DISPLAY" ]; then
406 if [ `echo $DISPLAY | cut -c1-10` = 'localhost:' ]; then
407 # X11UseLocalhost=yes
408 echo add unix:`echo $DISPLAY |
409 cut -c11-` $proto $cookie
410 else
411 # X11UseLocalhost=no
412 echo add $DISPLAY $proto $cookie
413 fi | xauth -q -
414fi
415.Ed
416.Pp
417If this file does not exist,
418.Pa /etc/ssh/sshrc
419is run, and if that
420does not exist either, xauth is used to add the cookie.
376.Sh AUTHORIZED_KEYS FILE FORMAT 421.Sh AUTHORIZED_KEYS FILE FORMAT
377.Cm AuthorizedKeysFile 422.Cm AuthorizedKeysFile
378specifies the file containing public keys for 423specifies the file containing public keys for
@@ -651,46 +696,8 @@ This file should be writable only by root/the owner and
651can, but need not be, world-readable. 696can, but need not be, world-readable.
652.Pp 697.Pp
653.It ~/.ssh/rc 698.It ~/.ssh/rc
654If this file exists, it is run with 699Contains initialization routines to be run before
655.Pa /bin/sh 700the user's home directory becomes accessible.
656after reading the
657environment files but before starting the user's shell or command.
658It must not produce any output on stdout; stderr must be used
659instead.
660If X11 forwarding is in use, it will receive the "proto cookie" pair in
661its standard input (and
662.Ev DISPLAY
663in its environment).
664The script must call
665.Xr xauth 1
666because
667.Nm
668will not run xauth automatically to add X11 cookies.
669.Pp
670The primary purpose of this file is to run any initialization routines
671which may be needed before the user's home directory becomes
672accessible; AFS is a particular example of such an environment.
673.Pp
674This file will probably contain some initialization code followed by
675something similar to:
676.Bd -literal
677if read proto cookie && [ -n "$DISPLAY" ]; then
678 if [ `echo $DISPLAY | cut -c1-10` = 'localhost:' ]; then
679 # X11UseLocalhost=yes
680 echo add unix:`echo $DISPLAY |
681 cut -c11-` $proto $cookie
682 else
683 # X11UseLocalhost=no
684 echo add $DISPLAY $proto $cookie
685 fi | xauth -q -
686fi
687.Ed
688.Pp
689If this file does not exist,
690.Pa /etc/ssh/sshrc
691is run, and if that
692does not exist either, xauth is used to add the cookie.
693.Pp
694This file should be writable only by the user, and need not be 701This file should be writable only by the user, and need not be
695readable by anyone else. 702readable by anyone else.
696.Pp 703.Pp
@@ -802,9 +809,9 @@ The file format and configuration options are described in
802.Xr sshd_config 5 . 809.Xr sshd_config 5 .
803.Pp 810.Pp
804.It /etc/ssh/sshrc 811.It /etc/ssh/sshrc
805Like 812Similar to
806.Pa ~/.ssh/rc . 813.Pa ~/.ssh/rc ,
807This can be used to specify 814it can be used to specify
808machine-specific login-time initializations globally. 815machine-specific login-time initializations globally.
809This file should be writable only by root, and should be world-readable. 816This file should be writable only by root, and should be world-readable.
810.Pp 817.Pp