0

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.

1 Answers1

0

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.

Fanatique
  • 5,153