Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to transfer a file between two remote servers using scp from a third, local machine?

Tags:

People also ask

How do I SCP between two remote servers?

Copy a File Between Two Remote Systems using the scp Command txt from the remote host host1.com to the directory /files on the remote host host2.com . You will be prompted to enter the passwords for both remote accounts. The data will be transfer directly from one remote host to the other.

How copy file from local machine to remote server?

You can use SecureShell (SSH) or Remote Sync (Rsync) to transfer files to a remote server. Secure Copy (SCP) uses SSH to copy only the files or directories that you select. On first use, Rsync copies all files and directories and then it copies only the files and directories that you have changed.

Which command is used to transfer a file between two remote hosts?

SCP is almost exclusively run from the command-line using the scp command. It uses the ssh (Secure Shell) to transfer data to and from remote hosts. As such, it has a set of options that specify the authentication parameters, hosts and port like SSH.

What is one way to transfer files between a local and remote host?

This is possible through FTP connection; however, no FTP server is installed on most of the Windows Dedicated Servers by default. Therefore, the simplest way to transfer/copy files between the server and your local machine is to copy via the Remote Desktop.


I'm trying to copy a file from one remote server to another remote server from my local machine. Here's what I'm trying to do

localA $ scp userB@remoteB:/path/to/file userC@remoteC:/path 

The problem is that I need to pass two passwords for both userB and userC on the remote machines.

According to Garron the above should work, but I got permission denied.

Permission denied (gssapi-keyex,gssapi-with-mic,publickey,keyboard-interactive). lost connection 

Any suggestions?