How can I transfer files between two remote linux server?

I have to transfer files from one remote remote server to another remote server. Both servers run on linux. I have root access to both. How can I copy the files? It would be a great help.

Junaed's picture

Use -P flag to specify port for both host server

 The port assigned by the '-P' parameter works with the 1st server, but the port for the second server remains the same. This -P flag defines the port for remote to remote file transfer for both servers. But ssh cannot define the port for both.

ssh -P 1111 user@server1.domain1.com user@server2.domain2.com

For the solution of the second problem, just edit ssh_config file at this directory /etc/ssh/ssh_config.

Host *.otherdomain.com
Port 1111

This will set 1111 as port of both servers. It is not mandatory to use 1111, you are free to choose for yourself. Hope this helps.

 

Vote the answer: 
0
No votes yet