Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 07-08-2010, 03:30 AM   #1
Registered: Sep 2009
Posts: 684
Blog Entries: 2

Rep: Reputation: 37
Error Executing the script.

Hi ,
I m getting an error after executing the script.

My script.

Script is used to find out the date on 8 different machines(mentioned in SERVERNAMES file).
I have added public key to avoid ssh password and ssh without password working fine.


Date=`ssh -t -t -q root@$1 date`
echo $Date

while read line
fn_VMFind "$line"
There are total 8 Server IP addresses mentioned in SERVERNAMES file.


tcgetattr: Inappropriate ioctl for device
Thu Jul 8 13:59:13 IST 2010
It shows Date on Only first server.
What can be the issue?
Old 07-08-2010, 06:20 AM   #2
LQ Guru
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,600

Rep: Reputation: 2926Reputation: 2926Reputation: 2926Reputation: 2926Reputation: 2926Reputation: 2926Reputation: 2926Reputation: 2926Reputation: 2926Reputation: 2926Reputation: 2926
Well my question back to you would be if you execute the following:
ssh -t -t -q root@ date
After running this are you back on your machine or still connected to server?
Old 07-08-2010, 06:21 AM   #3
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Just a guess:

After using ssh to login to the 1st server, don't you need to log out?

What happens if you do the commands manually? i.e. log into server#1, and get the date, then log in to #2
Old 07-08-2010, 10:34 PM   #4
Registered: Sep 2009
Posts: 684
Blog Entries: 2

Original Poster
Rep: Reputation: 37
VM_Date=$( ssh -T -q root@$1 date < /dev/null )
runs perfectly fine.
My problem is now solved.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Error executing Perl/CGI script loftus49 Fedora 6 06-10-2010 03:41 AM
Sntax error : unexpected end of file while executing shell script priyankarathi Linux - Newbie 5 04-21-2009 01:33 AM
Run an external script, without holding up the currently executing script onesikgypo Programming 2 03-07-2009 09:26 PM
Bash script - executing a script through subdirectories bubkus_jones Programming 5 04-24-2006 05:05 PM
Executing PHP script- error message vfulco Linux - Newbie 3 07-13-2004 10:55 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:49 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration