environment logged by debug3 (-vvv)

Damien Miller djm at mindrot.org
Mon Apr 28 09:14:28 EST 2014

On Sun, 27 Apr 2014, Eric Melville wrote:

> However, it appears to be limited to telling the user which variables
> are being ignored. It would be useful to see what variables are
> impacting the session as well, such as KRB5CCNAME and any X11/DISPLAY
> related variables, spelled out, as well.

If you run with 'ssh -vv' (i.e. less than three 'v' options) then you
won't see the 'Ignored' lines and will just see the 'Sending' lines.

>     if (!matched) {
>         debug3("Ignored env %s", name);
>         free(name);
>         continue;
>     }
>     debug("Sending env %s = %s", name, val);

This only applies to environment variables that are explicitly passed.
Some are implicitly passed ($TERM) and others are implicitly set by
forwarding and authentication ($DISPLAY, $SSH_AUTH_SOCK, $KRB5CCNAME).

The ones that are implicitly set are done by the server, so there are
no easy ways for the client to see what the server is setting them to.
If you run a server in debug mode ('sshd -ddd') then you'll see
everything the server sets.


More information about the openssh-unix-dev mailing list