We don't have an easy way to specify using different ports for each
host (this is a fairly uncommon configuration), but you can set it up
in your $HOME/.ssh/config file, perhaps something like this:
...and so on. Then "ssh 192.168.0.101" will automatically uses port
See the man page for ssh_config(5) for details.
On Mar 17, 2009, at 4:45 AM, Bernhard Knapp wrote:
> I want to start a gromacs simulation on a small cluster where non
> standard ports are used for ssh. If I just use a "normal" maschinelist
> file (with the ips of the nodes), consequently, the following error
> comes up:
> ssh: connect to host 192.168.0.103 port 22: Connection refused
> I guess that I need to somehow tell him to use the other ports. I
> it in the following way (maschinelist file):
> 192.168.0.101 -p 5101
> 192.168.0.102 -p 5102
> 192.168.0.103 -p 5103
> 192.168.0.104 -p 5104
> But it seems this is not the correct way to specifiy the port:
> Open RTE detected a parse error in the hostfile:
> It occured on line number 1 on token 5:
> How can I tell him to use port 5101 on machine 192.168.0.101?
> May be the question is stupid but I could not find a solution via
> or search function ...
> users mailing list