Despite plink (putty link, which provides remote evaluation of commands on remote cluster by using ssh) is Windows application, I hope that You will help me in this question.

I have the remote connection to the cluster by using ssh. There are different nodes on the cluster. By default I get the connection to the node "b", at which my directory is located. When I want to make calculations, I need to use interactive regime for making them under the strong node, called "s":

  ssh s

I have the shell script on my local Windows machine which authomatizes procedure of calculations: I use pscp (putty scp) for sending file with initial data, and plink for remote start of calculations on cluster (by launching bash script which is located in my cluster directory). However, I stuck with one problem: I can't make calculations on the node which I want remotely.

Precisely, I launch calculations through running the bash script (located on cluster) by using following plink command:

  plink -ssh -i mykey.ppk name@host.com ~/script

By default the script (and hence the calculation) runs on "b" node. I want to make the calculation on "s" node. But unfortunately, I don't know how to force making of calculations on the node which I want. For example, if I simply write

  plink -ssh -i mykey.ppk name@host.com -t -t ssh s ,

then the window with cluster under "s" node is opened, and script stops work.

  • 1
    do you mean plink ... -t ssh -t s ? – meuh May 29 '16 at 10:55
  • @meuh : no, the line which I've written. Is there some problem with it? – John Taylor May 29 '16 at 13:31
  • @meuh : I've tried Your variant, and in the result got the cluster window under s node. – John Taylor May 29 '16 at 16:49
  • 1
    I'm not too sure of how plink works on windows, but presumably you can just give it a single string that will be executed on b, and this string can therefore be the ssh to node s and the command to run there, eg: plink -ssh -i mykey.ppk name@host.com -t 'ssh -t s ~/script' – meuh May 29 '16 at 17:09
  • 1
    congratulations! I'm sorry, I'm not familiar with windows command line conventions, so it seems single quotes mean something special. – meuh May 29 '16 at 18:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.