Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Using dsh you can define the list of machines in ~/.dsh/machines.list in the form:

<user>@<host>

I'd like to have multiple hosts with different ssh ports, like this (I tried):

<user>@<samehost>:<onePort>
<user>@<samehost>:<anotherPort>
<user>@<samehost>:<yetAntherPort>

But dsh complains with a "Could not resolve hostname: user@samehost:onePort" for every line with the ":port".

I browsed the manual and there is no mention of "per line" port (there is just a global config), am I out of luck?

Thank you

share|improve this question

1 Answer 1

up vote 0 down vote accepted

dsh (dancer's shell): is it possible to specify ports in config file?

As far as I have tried, I'm afraid that the answer is: No.

Use pssh instead.

machines.pssh

localhost testuser
192.168.5.141:2317 quanta

then try something like this:

parallel-ssh -P -h machines.pssh w
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.