Changing ssh port

If I change ssh port on machine from I submit jobs, MoMs have problems with sending back files after job was finish. This is because I use scp to file transfers. So in this case I should change ssh port on all machines in complex to file transfer work corectly, yes?
Do I can set some magic PBS_* variable in pbs.conf to tell MOM on with port she should sends data?

This is really up to how you’ve configured SSH on your nodes. You have a couple of options (that I’m aware of):

  1. Write a wrapper for ssh that adds a command-line option that specifies the port you would like to use, and set that wrapper as the value for the PBS_SCP variable in your pbs.conf file.

  2. My preferred option, and what I do when needing to change how my ssh clients behave: Modify the /etc/ssh/ssh_config on your compute nodes and add a Host entry for your domain (or for your submit hosts, if you can reasonably enumerate them) that has in it a Port entry. E.g.

        Port 2222

Hope this helps,


1 Like