I have two remote Debian servers, A and B. How can I copy a directory of files at…
- User
I have two remote Debian servers, A and B. How can I copy a directory of files at
~/Documents/training_resultsexisting on server A to the path~/training_resultson server B? I have SSH access on my local laptop to each of the servers, but neither of the servers have SSH access to the other. - Assistant
To copy files from one computer to another using SSH, you can use the SCP (Secure Copy Paste) program. SCP comes default in OpenSSH on many distributions. Use the following command.
code$ scp -r <user>@<server_a ip>:~/Documents/training_results <user>@<server_b ip>:~/training_resultsNow I will explain what this command does.
The
-roption is to copy directory(s) recursively. Then you enter the User you want and the IP address for server A, then a colon. The directory we will copy istraining_resultsfrom theDocumentsfolder at the userhomedirectory. Next, you enter the User you want and the IP address for server B, and then we do the same thing and enter the path where we will be pasting the file(s)/directory(s).I hope this helps!
- User
Thank you. Can you explain in more detail with better organization?
- Assistant
Sorry, yes I can explain how to copy a directory of files from one remote Debian server to another remote Debian server in more detail and with better organization. To copy files from one remote server to another you can use the SCP program with the following command:
code$ scp -r <user>@<server_a ip>:~/Documents/training_results <user>@<server_b ip>:~/training_resultsNow I will explain this command in more detail. The
scpcommand allows you to use ssh protocol to copy files from a source location to a target location like socode$ scp <source> <target>Usually this is from a local to a remote machine or a remote machine onto your local machine, but according to the manual
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Identical first prompt
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)