scp may be this bug?

Hello.

I tried to copy a directory with scp:
Code:
scp -P 64000 -r root@server:/home/instruction/ /home/instruction
it placed into /home/instruction/instruction...

Then I tried command
Code:
scp -P 64000 -r root@server:/home/instruction/* /home/instruction
and got the desired result.

If I copy with rsync:
Code:
rsync -avz --rsh='ssh -p64000' root@server:/home/instruction/ /home/instruction
and got the desired result too.

Why is this so? Is that correct?

Why ended slash was ignored?
 
It does exactly what it's supposed to do.

NB. Don't allow root logins over SSH, there's a reason why that's turned off by default.
 
sintetic said:
Hello.

I tried to copy a directory with scp:
Code:
scp -P 64000 -r root@server:/home/instruction/ /home/instruction
it placed into /home/instruction/instruction...

Correct. You told it to copy the instruction/ folder into the location /home/instruction/. Think of it in terms of files. Where would a file called "instrcuction" be copied to if you did $ cp instruction /home/instruction It would put that file into a directory called /home/instruction.

The correct syntax for that command would be:
$ scp -P 64000 -r root@server:/home/instruction /home/
 
Back
Top