0

When I use scp to copy one file to my local machine, it is successful:

scp -r [email protected]:/NMM/sector0.txt ./
[email protected]'s password:
sector0.txt                                                                                                
100% 3774     3.7KB/s   00:00

but when I try to copy the folder to my local machine, it fails:

root@b4860qds:~# scp -r [email protected]:/NMM/  ./
[email protected]'s password:
scp: Failed to open file /NMM/.
5
  • Can you do ssh [email protected] ls -l /NMM/ for us? Maybe you have x but not r on the directory, which would prevent you from listing all its contents (and hence knowing what to copy). Commented Jan 24, 2018 at 8:38
  • add words, [email protected] is my win7 PC, and it run the Freesshd software to start ssh sever. I have checked the the NMM folder security same with the file sector0.txt. any other suggestion ? thx much for your answer.
    – Mark
    Commented Jan 24, 2018 at 9:04
  • Isn't NMM a symbolic link? Like said before, output of ls -l will help. Otherwise we can just guess. Commented Jan 24, 2018 at 9:27
  • Works for me on Linux (source and target), also on symlinks. Could be a Windows issue.
    – Murphy
    Commented Jan 24, 2018 at 10:10
  • thx all, maybe about some SSH server configuration not well by myself. when I setup a Bitvise SSH server . it work well.
    – Mark
    Commented Feb 1, 2018 at 8:53

1 Answer 1

0

As you are copying from linux to windows drive, better you need to give the drive name like C,D,E.

(in below case where D refers to Drive, drive should prefix with double slash)

Example:

scp -r [email protected]://D:/NMM/  ./

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .