Top community members
All Questions Ask Question

Many years me and my friends we were volunteers on my university doing programming classes for young people.

I got main conclusion: Young people are awesome, especially students, because they always bring new and fresh ideas :)
* I loved to do it but my time is limited

  I decided to create something that will help millions of students

Now I am here

co-founder

Linux SCP - copy file between 2 remote servers

1 answers
1 points

How can I copy file between 2 remote Linux servers with SCP command?

1 answers
1 points

Quick solution:

scp root@2.2.2.2:/home/my_file.zip /home/

Explanation:

  • We currently are on remote server 1 (IP: 1.1.1.1)
  • And we want to copy file from remote server 2 (IP: 2.2.2.2)
  • We execute the command from remote server 1
    scp root@2.2.2.2:/home/my_file.zip /home/
  • When we execute the command we will be asked to provide password to remote server 2
  • And the file will start to download
  • After download is finish the file will be on server 1 under path:
    /home/my_file.zip

Note: it is important to use the last slash eg /home/

Why?

Without this slash eg /home, we will copy the file not to directory but we will try to copy it as "home" filename instead of my_file.zip.

0 comments Add comment

Checkout latest Findings & News:

Checkout latest questions:

Checkout latest wiki articles:

Hey 👋
Would you like to know what we do?
  • Dirask is IT community, where we share coding knowledge and help each other to solve coding problems.
  • We welcome everyone,
    no matter what the experience,
    no matter how basic the question is,
    this community will help you.
Read more