Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

remote login

Status
Not open for further replies.

santanudas

Technical User
Mar 18, 2002
121
GB
Hi all,

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

for ix in ${HOST}; do
ssh -T ${ix} << EOF
	some commnds
	.......
	......
	exit;
EOF
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.

 
How about adding this to the script...

export $TERM=xterm

I think that should work.
Mark
 
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.
 
Hello,

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

santanudas,
did you try that, too?
 
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.
 
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.

Mark

 
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.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top