Hacker News new | ask | show | jobs
by bravetraveler 1590 days ago
Fellow Kitty user here, similar hurdles.

If you haven't implemented it in your workflow already, you can conditionally set TERM for hosts in your SSH configs with SetEnv.

This is one of the few, if not the only, variable that SSHd will allow clients to set for free.

1 comments

What does your last sentence mean? What is the "cost" for setting other vars?
There are only a few environment variables allowed to be set by an SSH client by default. You can add more by adding an "AcceptEnv" line to the SSH server "/etc/sshd_config" file.
As others have pointed out - security restriction.

The service must allow most variables to be set by connecting clients.

If TERM were included in this, you might as well install the terminfo! Fortunately that's not the case.

One could do some interesting things if say SHELL or LDPRELOAD were allowed to be forwarded.

It means it's not constrained by security concerns. Some Env are not forwarded. This one is.