Register
It is currently Thu Oct 23, 2014 1:58 am

ssh script that sshs to another machine.


All times are UTC - 6 hours


Post new topic Reply to topic  [ 4 posts ] 
Author Message
 PostPosted: Sat Sep 11, 2010 1:10 pm   

Joined: Wed Nov 26, 2008 7:43 pm
Posts: 50
Location: Texas
HI everyone,

So far I have gotten the script to do easy things like:

ssh -l ted -T master.unb.ca "cd experiments/merged; pwd; svn up"

but I can't get it to do this:

ssh -l ted -T master.unb.ca "ssh comp-03"
Pseudo-terminal will not be allocated because stdin is not a terminal.

How could I make this work.
I'm eventually interested for my script to connect to the master computer
ssh to a node, cd to a directory, and run a script.

Ted.


Top
 Profile  
 PostPosted: Sat Sep 11, 2010 2:43 pm   
User avatar

Joined: Sun Jun 27, 2010 12:57 am
Posts: 192
Read the SSH man page:
Code:
-T      Disable pseudo-tty allocation.


Top
 Profile  
 PostPosted: Sun Sep 12, 2010 1:31 pm   

Joined: Wed Nov 26, 2008 7:43 pm
Posts: 50
Location: Texas
I've tried without the -T and it doesn't work, I want to go to a directory on that machine and run a script.

ssh -l ted master.unb.ca "ssh comp-03; cd tests; ./run.sh"

I get this:
Pseudo-terminal will not be allocated because stdin is not a terminal.

but I'd like to be able to see what it is doing on the remote machine comp-03.

Ted.


Top
 Profile  
 PostPosted: Sun Sep 12, 2010 10:34 pm   
User avatar

Joined: Sun Jun 27, 2010 12:57 am
Posts: 192
And if you really had read the manual page, the line below the -T option would have said: -t Force pseudo-tty allocation.


Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot] and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP