[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

screen -X

From: Jim Lloyd
Subject: screen -X
Date: Wed, 3 Dec 2008 15:32:10 -0800

I'd like to so something that I bet savvy unix admins do all the time
with screen, but I haven't figured out the trick.

I have a shell script that lets me do this:

$ each <command>

The script expands this running the same command on several machines:

$ ssh host1 <command>
$ ssh host2 <command>
$ ssh hostN <command>

The script basically works fine, but it executes the commands
serially. For long running commands, I'd like to run them in parallel.
Ideally I'd run them in a detached screen session on each machine. The
ssh command should execute just long enough to start the long running
command in a detached screen session.

The -X option seems like it's intended for this purpose, but it seems
to be a no-op. The man page says "Note that this command doesn't work
if the session is password protected." To my knowledge the session is
not password protected, but perhaps I am misunderstanding this.

Is there some simple recipe for using ssh to execute a command in a
detached screen on another host?

Jim Lloyd

reply via email to

[Prev in Thread] Current Thread [Next in Thread]