1

when i am logged into my server via SSH how can i spawn many ssh terminals? is there a xterm command for this?

sterz
  • 764
  • 2
  • 12
  • 26

6 Answers6

2

Use screen for this. First, create a startup script for screen like the following:

screen ssh host1
screen ssh host2
... 
screen ssh hostN

Then start screen with:

screen -c startup_script

You probably should use ssh-agent to have password less logins for ssh sessions.

JooMing
  • 884
  • 5
  • 15
2

terminator can do miracles. Prepare a layout with the number of terminals you want, and call terminator with the -l argument, eg.:

terminator -l mylayout

You can also use it on your workstation and spawn as many ssh sessions you want.

Previously, i would have use clusterssh for that purpose, but terminator is so easier to deal with window placement

simonp
  • 776
  • 5
  • 3
1

Try using screen

Or just open up another terminal and ssh into the server again.

dmah
  • 416
  • 2
  • 3
  • yes it is indeed screen i have to use. i wish you had elaborated a wee more. i found what i was looking at: http://www.cyberciti.biz/tips/linux-screen-command-howto.html#comment-161499 although i was looking to pop up more terminals on gnome, it does still does the job – sterz Nov 25 '10 at 21:48
0

Use ctrl-alt-F2 to get to a new console login. Log in and type "startx -- :1" and it will start X in a new session. You can now go back to you old X session(:0) by using ctrl-alt-F7 and your newly created session by using ctrl-alt-F8. FYI, the console/X corresponding function keys are F1==F7, F2==F8, F3==F9 etc.

You can start a third X session by using ctrl-alt-F3, logging in and typing "startx -- :2". This session will be on F3/F9. All that is assuming you haven't changed any of the mingetty settings in /etc/inittab

Hope this helps you.

Sagar Khetia
  • 138
  • 1
0

Type "xterm&" to launch a new terminal already logged into the remote computer, displaying on the local display.

0

you could create a script called "myxterms" or something like that.. have it startup when you start X. This would spawn 5 xterm:

---CUT---

#!/bin/sh

for i in seq 1 5

do

xterm &

done

--- CUT ---

or if you want to spawn multiple ssh connections to different hosts in different xterms you could do:

--- CUT ---

#!/bin/sh

xterm -e ssh -l username1 myhost1 &

xterm -e ssh -l username2 myhost2 &

xterm -e ssh -l username3 myhost3 &

xterm -e ssh -l username4 myhost4 &

--- CUT ---

aspitzer
  • 150
  • 4