[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: using parallel for remote host processing
From: |
Ole Tange |
Subject: |
Re: using parallel for remote host processing |
Date: |
Sat, 12 Oct 2013 13:54:12 +0200 |
On Fri, Oct 11, 2013 at 10:33 PM, Maracic, Jay
<Jay.Maracic@morganstanley.com> wrote:
> So what I want is to be able to pass the following ssh options into
> parallel:
>
> -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null
:
> I have modified parallel to include the options, and this works as desired.
I am surprised that you have been able to change the code, but you
have not been able to see how to do it without changing the code.
I am not sure if that means that the documentation is hard to
understand or that the code is easy to understand.
> sub sshcommand_of_sshlogin {
> # 'server' -> ('ssh -S /tmp/parallel-ssh-RANDOM/host-','server')
> # 'user@server' -> ('ssh','user@server')
> # 'myssh user@server' -> ('myssh','user@server')
!!!!!!!!!!!!
> # 'myssh -l user server' -> ('myssh -l user','server')
>
> # '/usr/bin/myssh -l user server' -> ('/usr/bin/myssh -l user','server')
!!!!!!!!!!!!!!
Note those 2 comments: They actually give you hints on how to do it.
> I am wondering if parallel can accept these ssh options thus obviating the
> need for modifying parallel?
Also look at 'man parallel':
-S [ncpu/]sshlogin[,[ncpu/]sshlogin[,...]]
--sshlogin [ncpu/]sshlogin[,[ncpu/]sshlogin[,...]]
:
An sshlogin is of the form:
[sshcommand [options]][username@]hostname
:
For examples: see --sshloginfile.
:
--sshloginfile filename
--slf filename
File with sshlogins. The file consists of sshlogins on
separate lines.
Empty lines and lines starting with '#' are ignored. Example:
server.example.com
username@server2.example.com
8/my-8-core-server.example.com
2/my_other_username@my-dualcore.example.net
# This server has SSH running on port 2222
ssh -p 2222 server.example.net
4/ssh -p 2222 quadserver.example.net
# Use a different ssh program
myssh -p 2222 -l myusername hexacpu.example.net
# Use a different ssh program with default number of cores
//usr/local/bin/myssh -p 2222 -l myusername
hexacpu.example.net
# Use a different ssh program with 6 cores
6//usr/local/bin/myssh -p 2222 -l myusername
hexacpu.example.net
# Assume 16 cores on the local computer
16/:
Please let me know how I can improve the documentation so you would
have found this.
/Ole