Discussion:
ssh tput error 'tput: No value for $TERM and no -T specified'
(too old to reply)
Matt Price
2004-10-15 13:20:12 UTC
Permalink
hi folks,

I've been having this wierd error message when I ssh into my server:
'tput: No value for $TERM and no -T specified'
it's repeated about 20 times when I ssh in with a command, e.g.

ssh server cat .bashrc
or
rsync server:/home/matt /home/matt

the error doesn't show up when I just ssh in to a login shell, e.g.:
ssh anarres

I've checked and $TERM is in fact set to 'xterm' on the client
temrinal before I execute the ocmmand, and in remote sessions started
with ssh. So I don't understand why I get the error. I've googled
around and not found much on this issue -- anzone have any ideas?

thanks,

Matt
--------------------------
.''`. Matt Price
: :' : Debian User
`. `'` & hemi-geek
`-
--------------------------
don't use these addresses: ***@derailleur.org, ***@derailleur.org
--
To UNSUBSCRIBE, email to debian-user-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Thomas Dickey
2004-10-17 13:20:10 UTC
Permalink
Post by Matt Price
I've checked and $TERM is in fact set to 'xterm' on the client
temrinal before I execute the ocmmand, and in remote sessions started
perhaps. I just ran
ssh server env
and saw no sign of $TERM, other than the message
TERM: Undefined variable.
--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net
--
To UNSUBSCRIBE, email to debian-user-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Matt Price
2004-10-20 16:10:11 UTC
Permalink
Post by Thomas Dickey
Post by Matt Price
I've checked and $TERM is in fact set to 'xterm' on the client
temrinal before I execute the ocmmand, and in remote sessions started
perhaps. I just ran
ssh server env
and saw no sign of $TERM, other than the message
TERM: Undefined variable.
hmm. same here. But when I try:
TERM=xterm ssh server env
there's s till no sign. So what would the next step be?

matt
--
To UNSUBSCRIBE, email to debian-user-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Thomas Dickey
2004-10-20 23:40:07 UTC
Permalink
Post by Matt Price
Post by Thomas Dickey
Post by Matt Price
I've checked and $TERM is in fact set to 'xterm' on the client
temrinal before I execute the ocmmand, and in remote sessions started
perhaps. I just ran
ssh server env
and saw no sign of $TERM, other than the message
TERM: Undefined variable.
TERM=xterm ssh server env
there's s till no sign. So what would the next step be?
I'm not sure (that is I don't know which part of the ssh connection is doing
this).

ssh's either filtering out some/all environment variables, or because the
connection is coming in on a pty which doesn't actually have a terminal
associated with it, the target is stripping it out since it doesn't know. In
some contexts, that sort of thing would set $TERM to "network".
--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net
--
To UNSUBSCRIBE, email to debian-user-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Matt Price
2004-10-21 15:20:09 UTC
Permalink
Post by Thomas Dickey
Post by Matt Price
Post by Thomas Dickey
Post by Matt Price
I've checked and $TERM is in fact set to 'xterm' on the client
temrinal before I execute the ocmmand, and in remote sessions started
perhaps. I just ran
ssh server env
and saw no sign of $TERM, other than the message
TERM: Undefined variable.
TERM=xterm ssh server env
there's s till no sign. So what would the next step be?
I'm not sure (that is I don't know which part of the ssh connection is doing
this).
ssh's either filtering out some/all environment variables, or because the
connection is coming in on a pty which doesn't actually have a terminal
associated with it, the target is stripping it out since it doesn't know. In
some contexts, that sort of thing would set $TERM to "network".
hmmm., But why am I getting this message when not everyone seems to get
it? I've tried, for instance, setting LogLevel = QUIET in
/etc/ssh/sshd_config, but no luck.

the problem isn't catastrophic, but it IS very distracting and annoying.

ah well.
matt
--
To UNSUBSCRIBE, email to debian-user-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Thomas Dickey
2004-10-22 11:10:05 UTC
Permalink
Post by Matt Price
hmmm., But why am I getting this message when not everyone seems to get
it? I've tried, for instance, setting LogLevel = QUIET in
/etc/ssh/sshd_config, but no luck.
It may depend upon the shell and the way your .profile is setup - though most
people on this newsgroup use bash, I use tcsh. (not at home to check) my
.cshrc probably refers to $TERM someplace, and csh/tcsh require more than just
quotes to stop a warning about an undefined variable. If you're using tput to
set your prompt string, that would be a place to check on quoting, etc. Most
bash users hardcode prompt and key-binding strings, so they wouldn't notice
this problem.
--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net
--
To UNSUBSCRIBE, email to debian-user-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Loading...