addEnvVariable(Environment.ENV_USER, ((ServerSession) session).getUsername());
// If the shell wants to be aware of the session, let's do that
if (command instanceof SessionAware) {
((SessionAware) command).setSession((ServerSession) session);
}
out = new ChannelOutputStream(this, remoteWindow, log, SshConstants.Message.SSH_MSG_CHANNEL_DATA);
err = new ChannelOutputStream(this, remoteWindow, log, SshConstants.Message.SSH_MSG_CHANNEL_EXTENDED_DATA);
// Wrap in logging filters
out = new LoggingFilterOutputStream(out, "OUT:", log);
err = new LoggingFilterOutputStream(err, "ERR:", log);
in = new ChannelPipedInputStream(localWindow);
shellIn = new ChannelPipedOutputStream((ChannelPipedInputStream) in);