I have the following situation. I am working on my local computer A. I need to run code on a remote server C, which i can only access from remote server B. So to access C from A, i first connect with ssh to remote server B and then from there with ssh to server C.

I will have to send files back and forth quite often between A and C. What is an easy way to do this?

 Ssh connection:

 Requested file transfers:
  • What do you think about answer? – Isa Bek Dec 5 '17 at 9:14
  • @isaBek Thanks for the link, although honestly i am quite new to this and have no idea what those methods are, and why one would be better or worse to use in my case (frequent file exchange) – user3053216 Dec 5 '17 at 12:39

Make a script on server "A" with connection initiation on server "B" and command sending that will connect your server "C" and send forward commands needed like "ARGS: %1 %2 %3 etc..."

See how to run command on another server here: "https://stackoverflow.com/questions/1041597/how-to-run-a-script-file-remotely-using-ssh"

Example: ssh user@serverB './scripts/ServerC_command.sh'

Your Answer

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

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