It is necessary to organize the transfer of data from one remote server to another, without downloading to my computer. This is done via scp, but I have not found one that supports this. Maybe someone thread came across this?
1 answer
What prevents you from logging in using WinSCP over SSH and, on behalf of the server, do as described below or use Putty?
Copy the .bash_history file from the first server, from the home directory to the home directory of the second one and immediately change its name and extension to bash_history.log You will need to enter the passwords two times from the first server and the second one. Naturally input will not be displayed in the terminal.
If you have an active SSH connection, break it with the
exit
$ scp user@remote_1.ru:~/.bash_history user@remote_2.ru:~/bash_history.log SCP (Secure CoPy) is a program for remote copying of files over a network between hosts. It uses SSH to transfer data, the same authentication and the same security measures as SSH. While copying the source file to a destination file that already exists, the SCP overwrites the destination file.
If the destination file does not already exist, then an empty file is created, the destination file name is set to it and the contents of the file being copied are already written to it !!!
Example 1: Copy the file "file.txt" from a remote server to a local computer.
$ scp user@remote.host:file.txt /some/local/directory
Example 2: Copy the file "file.txt" from the local computer to a remote server.
$ scp file.txt user@remote.host:/some/remote/directory
Example 3: Copy the folder "dir1" from the local host to the directory "dir2" on the remote host.
$ scp -r dir1 user@remote.host:/some/remote/directory/dir2
Example 4: Copy the file "file.txt" from one remote server "remote.host1" to another remote server "remote.host2".
$ scp user@remote.host1:/directory/file.txt user@remote.host2:/some/directory/ Example 5: Copy the files "file1.txt" and "file2.txt" from the local computer to your home directory on a remote server.
$ scp file1.txt file2.txt user@remote.host:~ Example 6: Copy the file "file.txt" from the local host to the remote host using port 2222.
$ scp -P 2222 file.txt user@remote.host:/some/remote/directory Example 7: Copy the file "file.txt" from the local computer to your home directory on a remote server. We save time of change and access time and the rights of the copied file.
$ scp -p file.txt user@remote.host:~ Example 8: Copy the file "file.txt" from the local computer to your home directory on a remote server. Increasing SCP speed by changing the encryption algorithm from AES-128 (by default) to Blowfish.
$ scp -c blowfish file.txt user@remote.host:~ Example 9: Copy the file "file.txt" from the local computer to your home directory on a remote server. We limit the width of the channel used by the SCP command to 100 Kbit / s.
$ scp -l 100 file.txt user@remote.host:~ Example 10: Copy several files from a remote host to the current directory on your local host.
$ scp user@remote.host:~/\{file1,file2,file3\} . PS If rsync is on the receiving side, then you can use it:
rsync -azP user@remote.host1:~/ user@remote.host2:~/ - recursively with the resume, copying rights and compression on the fly will transfer the home directory from one server to another.