I am running an executable in my slurm script on my cluster that requires ssh'ing to multiple nodes, however when I run the script, I get an error call "Couldn't find remote shell program: ssh". ssh is in my /usr/bin path and works well locally, how can I make it work in my sjob script in parallel.

Usually I would just create an environment module for the program and load the program within in my job script, but making a module for ssh does not make too much sense.

  • your slurm job needs to ssh to multiple nodes in the cluster? that's a very odd way of using a cluster - user scripts ssh-ing to other nodes and running processes/consuming resources defeats the point of a scheduling & resource manager like slurm and makes it impossible for it to do its job properly (it needs to know what resources are in use and which are still available for use). Are you sure you actually need to do that, or can you use a shared filesystem to transfer files, or MPI or similar for your computation task to communicate with other instances?
    – cas
    Commented Feb 12, 2018 at 2:33
  • by "resources", I mean node-specific things like CPU cores, RAM, GPUs, etc. I suggest you talk to your cluster admins and ask for advice on how to do whatever it is you're trying to do. Talk to them about your actual goal, not necessarily your proposed approach to solving it (see xyproblem.info for why that matters)
    – cas
    Commented Feb 12, 2018 at 2:39

1 Answer 1


It sounds like slurm doesn't have the same path. Either set the slurm path to include /usr/bin or call ssh as /usr/bin/ssh.

  • hello, what file do I set my path?
    – airzinger1
    Commented Feb 11, 2018 at 20:19
  • Put these in your script: echo "PATH=$PATH" which ssh ls -la /bin/ssh /usr/bin/ssh
    – Pedro
    Commented Feb 25, 2018 at 6:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .