Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

remote login

remote login

remote login

Hi all,

I use this script:


HOST=`seq 11 18 | gawk '{printf("node%03i\n",$1);}'`

for ix in ${HOST}; do
ssh -T ${ix} << EOF
    some commnds
to remotely login on to all of my nodes, say e.g. from “node011” to “node018”. The script runs fine, I can login and do stuff on the node as well. But upon exit, I get this warning message: TERM environment variable not set.

No real hard done but just a bit annoying. Any idea how to get rid of this message? Thanks in advance.

RE: remote login

How about adding this to the script...

export $TERM=xterm

I think that should work.

RE: remote login

Thanks for your reply, Kozusnik. I already tried that putting in many different places in the script but alash! didn't work. I checked the TERM variable both on the remote and the local machine; values are just fine there, but still didn't work.

RE: remote login


what Kozusnik probably intended was this:
export TERM=xterm
(no $ there !)

did you try that, too?

RE: remote login



what Kozusnik probably intended was this:
export TERM=xterm
Yeah, I got that and I tried that too, including:

export TERM=linux
export TERM=xterm-color

but none of them seemed to work.

RE: remote login

Thanks for the correction...I tend to add the $ in on all variables. I spend most of my time on PERL & PHP, not so much on shell scripts.

Is xterm installed on each node? If you run the command "which xterm", does it return "/usr/bin/xterm" or another path? Or does it say it's not found. Maybe it's not installed, or not in your PATH.


RE: remote login

Hi all, I got it now. It looks like I was not putting export TERM=xterm in the proper place. Having done this now:

ssh -T ${ix} << EOF
export TERM=xterm

i.e. just after the "ssh" line, works for me, so far. Thaks to all of you for replying.


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close