I want to copy file/s from remote server to central server and then to localhost

The way I access is from localhost I connect to central server using SSH

Then I connect to required remote server using pmrun as pmrun -h jmjgv12643 user001

user001 is privilged user where as I am not.

I need to copy files from jmjgv12643 to central server and then back to localhost.

How can I do that, If more explanation is needed, Please let me know.

  • If the problem is one of permissions then this post might help. Otherwise, does the problem also arrive when connecting with the remote computer's IP address rather than its name? – harrymc May 17 '19 at 8:18
  • Any comment on the above? – harrymc May 19 '19 at 7:10

As far as I know you can use scp with pmrun. I am not sure how it works with the hostname widget (-h), but your scenario should work as follows:

1 Connect to central server with SSH, and from the central server, use the pmrun command in the following way to copy files from the remote server over to the central one:

pmrun -h scp user001@jmjgv12643:/path/to/file/to/copy local_file_or_directory

2 Once the files are on the central server you can just use plain scp to copy them. From your local machine, you can use the following command to copy files from your central server to localhost:

scp user@central:/path/to/file/to/copy local_file_or_directory

Here user is the user you use to log into central server (central).
local_file_or_directory is the destination where you want your files to be copied.

  • pmrun -h scp user001@jmjgv12643:/path/to/file/to/copy local_file_or_directory does not work it says pmrun5.5.2 (044): 5033 Cannot resolve hostname (scp) – Akhil Jain May 13 '19 at 12:31
  • @AkhilJain this is happening because scp cannot resolve the hostname that pmrun knows.. can you try to connect by using IP address and not hostname? – Fanatique May 20 '19 at 9:14

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.