M
M
MoyMirok2022-03-24 16:46:01
linux
MoyMirok, 2022-03-24 16:46:01

What's wrong with the team?

sudo scp -r /home/user [email protected]:/home/user/
usage: scp [-12346BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file]
[-l limit] [-o ssh_option ] [-P port] [-S program]

Already tried different options, what's wrong?

sudo scp -r [email protected]:/home/user/* /home/
user

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
MoyMirok, 2022-03-26
@MoyMirok

Non-printable characters got in the way. I rewrote everything character-by-character by hand - everything worked.

D
Drno, 2022-03-24
@Drno

well, because at first it is indicated where we connect and only then what we copy from ...

V
Valentine, 2022-03-24
@ProFfeSsoRr

1) What's the point of sudo?
2) in the second case (which works) you copy all the files inside the folder from the remote server to your folder. In the first case, you want to copy a local folder to a remote one. As a result, what is the problem, that it is not copied from the local computer to the remote one, although on the contrary - it is copied? Isn't it the case that you are copying the user's home folder under the same user? And the user has no rights to write to / home on a remote machine, because only root can write to / home by default. You try to upload scp to /home/user/tmp, for example, and then move the files locally on that machine.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question