LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 10-21-2008, 02:19 AM   #1
kushkothari
Member
 
Registered: Oct 2008
Posts: 31

Rep: Reputation: 15
Question how to open a new terminal


I want to ssh to server and open this in a new terminal
like

/*shell code*/
ssh user@server
/*shell code*/

I want to get a new window for the server and continue working with my shell script.
 
Old 10-21-2008, 03:10 AM   #2
Hko
Senior Member
 
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: ubuntu
Posts: 2,530

Rep: Reputation: 108Reputation: 108
you want this:
Code:
xterm -e 'ssh user@server'
 
Old 10-21-2008, 03:19 AM   #3
kushkothari
Member
 
Registered: Oct 2008
Posts: 31

Original Poster
Rep: Reputation: 15
Thanks for the reply
that's what i want but I have problem when i use this I won't be able to work in original terminal like
xterm -e 'ssh -t user@server ssh node1'
xterm -e 'ssh -t user@server ssh node2'

I have these two commands to run in shell script but after executing the first one it's open a new window but second command won't get executed until I close the first one

I want something which will open a window and will come back to my original window and run another command.

please tell me how to do this?
 
Old 10-21-2008, 03:22 AM   #4
colucix
Moderator
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957
Just put it in background:
Code:
xterm -e 'ssh -t user@server ssh node1' &
xterm -e 'ssh -t user@server ssh node2'
 
Old 10-21-2008, 03:33 AM   #5
kushkothari
Member
 
Registered: Oct 2008
Posts: 31

Original Poster
Rep: Reputation: 15
ya it's working now

I am facing one more problem which is not related to terminal but it's related to ssh.

like in the following command if after "ssh node1" I want to give some command say: cd abc and then ls in abc how can I do that
xterm -e 'ssh -t user@server ssh node1'
 
  


Reply


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
open terminal rehan999 Linux - Software 13 03-12-2008 08:42 AM
open in terminal Four Linux - Newbie 2 01-21-2007 08:49 PM
Open A Terminal rmadd Linux - Software 3 09-19-2006 08:31 PM
open a terminal canucks Linux - Newbie 1 08-03-2004 01:24 AM
How to open programs in terminal without being stuck to the terminal?? brynjarh Linux - Newbie 6 07-07-2004 01:52 PM


All times are GMT -5. The time now is 05:16 AM.

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