diff --git a/crypto/openssh/session.c b/crypto/openssh/session.c index 2a725ea22cf..f5e0811f55a 100644 --- a/crypto/openssh/session.c +++ b/crypto/openssh/session.c @@ -1154,6 +1154,7 @@ do_child(Session *s, const char *command) child_set_env(&env, &envsize, "TZ", getenv("TZ")); /* Set custom environment options from RSA authentication. */ + if (!options.use_login) { while (custom_environment) { struct envstring *ce = custom_environment; char *s = ce->s; @@ -1167,6 +1168,7 @@ do_child(Session *s, const char *command) xfree(ce->s); xfree(ce); } + } snprintf(buf, sizeof buf, "%.50s %d %d", get_remote_ipaddr(), get_remote_port(), get_local_port());