How to transfer a file from one remote server to another remote server? Passwords for both the servers are available.
You can use the ‘scp’ command to achieve this.
Assuming that the file test.txt resides on server1 and needs to be transferred to server2.
Open the terminal of your local Linux machine and type the following command :
This will prompt you for the passwords. Once you enter them, it should go through fine.