I keep getting the following error message each time I try to use rsh
to get a (ls -a) listing from a remote filesystem:

"No value for $TERM and no -T specified"

The listing comes through fine, but I get that error message at the
end of the listing.

I'm using Redhat 9.0
GNU bash, version2.05b.0(1)-release(i386-redhat-linux-gnu)

In my ~/.bashrc I have tried the following:
export TERM='vt100'
export TERM='dtterm'
export TERM='xterm'

My shell is definitely bash, and echo $TERM reports one of the above.

So I know that the environment variable is set, but when I added a
echo "My term = $TERM" to my /etc/bashrc file, and then try to get
the listing it prints out the directory listing and reports that my
term is "dumb" and then prints out the error message.

I also get the error message when I try ssh like the following:

myprompt> ssh echo Hello; ( isn't real IP

No value for $TERM and no -T specifiedHello

No value for $TERM and no -T specified


So why isn't my $TERM variable being properly set for the rsh and ssh
(non-interactive? shells), and how should I set it?

I do understand that rsh isn't secure. I am working from a completely
isolated network.

Thanks for your help.