Home Explore Blog CI



man-pages

16th chunk of `ssh.man`
c6dd22a97b6f344273bece63941e21849ba473ec409a15590000000100000fd2
                         passwords.  Finally, if the  variable  is  set  to
                             “force”, then the askpass program will be used for
                             all passphrase input regardless of whether DISPLAY
                             is set.

       SSH_AUTH_SOCK         Identifies  the  path of a Unix‐domain socket used
                             to communicate with the agent.

       SSH_CONNECTION        Identifies the client and server ends of the  con‐
                             nection.   The  variable contains four space‐sepa‐
                             rated values: client IP address, client port  num‐
                             ber, server IP address, and server port number.

       SSH_ORIGINAL_COMMAND  This  variable  contains the original command line
                             if a forced command is executed.  It can  be  used
                             to extract the original arguments.

       SSH_TTY               This  is  set  to the name of the tty (path to the
                             device) associated with the current shell or  com‐
                             mand.   If  the  current  session has no tty, this
                             variable is not set.

       SSH_TUNNEL            Optionally set by sshd(8) to contain the interface
                             names assigned if tunnel forwarding was  requested
                             by the client.

       SSH_USER_AUTH         Optionally  set by sshd(8), this variable may con‐
                             tain a pathname to a file that lists the authenti‐
                             cation methods successfully used when the  session
                             was  established,  including  any public keys that
                             were used.

       TZ                    This variable is set to indicate the present  time
                             zone  if  it  was  set when the daemon was started
                             (i.e. the daemon passes the value on to  new  con‐
                             nections).

       USER                  Set to the name of the user logging in.

       Additionally, ssh reads ~/.ssh/environment, and adds lines of the format
       “VARNAME=value”  to the environment if the file exists and users are al‐
       lowed to change  their  environment.   For  more  information,  see  the
       PermitUserEnvironment option in sshd_config(5).

FILES
       ~/.rhosts
               This file is used for host‐based authentication (see above).  On
               some  machines  this  file  may need to be world‐readable if the
               user’s home directory is on an NFS  partition,  because  sshd(8)
               reads  it as root.  Additionally, this file must be owned by the
               user, and must not have write permissions for anyone else.   The
               recommended  permission  for most machines is read/write for the
               user, and not accessible by others.

       ~/.shosts
               This file is used in exactly the same way as .rhosts, but allows
               host‐based  authentication   without   permitting   login   with
               rlogin/rsh.

       ~/.ssh/
               This  directory  is  the  default location for all user‐specific
               configuration and authentication information.  There is no  gen‐
               eral  requirement  to keep the entire contents of this directory
               secret, but the recommended permissions  are  read/write/execute
               for the user, and not accessible by others.

       ~/.ssh/authorized_keys
               Lists  the  public  keys  (DSA, ECDSA, Ed25519, RSA) that can be
               used for logging in as this user.  The format of  this  file  is
               described  in  the sshd(8) manual page.  This file is not highly
               sensitive, but the recommended permissions  are  read/write  for
               the user, and not accessible

Title: SSH Environment Variables, SSH_TUNNEL, SSH_USER_AUTH, User Configuration Files
Summary
This section details additional SSH environment variables including SSH_TTY (the tty device), SSH_TUNNEL (tunnel interface names), SSH_USER_AUTH (authentication methods used), TZ (timezone), and USER. It also describes how ssh reads ~/.ssh/environment to add user-defined variables. Furthermore, it outlines the purpose and permissions of user configuration files such as ~/.rhosts, ~/.shosts, ~/.ssh/ (for configuration and authentication information), and ~/.ssh/authorized_keys (for public keys used for login).