Bug 1336 - Environment variable changes
Summary: Environment variable changes
Status: CLOSED WORKSFORME
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: ssh (show other bugs)
Version: 4.3p2
Hardware: ix86 Linux
: P2 enhancement
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-08 06:36 AEST by PFudd
Modified: 2008-07-22 12:19 AEST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description PFudd 2007-07-08 06:36:44 AEST
I'm using rxvt-unicode as my terminal program.  It has a TERM environment variable of 'rxvt-unicode'.  My system has entries for that in termcap and terminfo.  Everything is hunky-dory.

When I ssh to another person's system, they don't have entries for that in termcap and terminfo.  I'd like to add an entry in ~/.ssh/config that lets me set the TERM environment variable, but that's apparently not an option yet.  My hackish solution is 'env TERM=xterm ssh somehost'.

I can't see where TERM is defined as an environment variable that should be sent; it's not in ~/.ssh/config nor /etc/ssh/ssh_config.  The man pages don't mention TERM; they explicitly say that no environment variables are sent (man ssh_config, look for SendEnv).  'Man slogin' says that some environment variables are set on the server side; but TERM isn't one of them.

Thanks!
Comment 1 Damien Miller 2008-06-12 17:47:56 AEST
Yes, the $TERM supplied by the client takes precedence over any one set in ~/.ssh/config.

On the other hand, you can set it in your shell's initialisation (.profile, .bash_profile) and also in ~/.ssh/environment (which does take precedence over the client-specified $TERM).

.ssh/environment is documented in the sshd(8) manpage.
Comment 2 Damien Miller 2008-07-22 12:19:09 AEST
Mass update RESOLVED->CLOSED after release of openssh-5.1