What are the
SSH_CONNECTION variables for? On my Ubuntu system both of them are blank; what values should they have?
ssh man page:
SSH_CONNECTION Identifies the client and server ends of the connection. The variable contains four space-separated values: client IP address, client port number, server IP address, and server port number. .... SSH_TTY This is set to the name of the tty (path to the device) associated with the current shell or command. If the current session has no tty, this variable is not set.
Because you are not in a ssh session, so these variables are not set.
Upon a successful connection, OpenSSH sets several environment variables.
SSH_CONNECTION shows the address of the client, the outgoing port on the client, the address of the server and the incoming port on the server.
SSH_TTY names the pseudo-terminal device, abbreviated Ppty, on the server used by the connection.
SSH_CONNECTION='192.168.223.17 36673 192.168.223.229 22' SSH_TTY=/dev/pts/6