0

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

scp -r administrator@10.6.120.80:/NMM/sector0.txt ./
administrator@10.6.120.80'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 administrator@10.6.120.80:/NMM/  ./
administrator@10.6.120.80's password:
scp: Failed to open file /NMM/.
  • Can you do ssh administrator@10.6.120.80 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). – Ulrich Schwarz Jan 24 '18 at 8:38
  • add words, administrator@10.6.120.80 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 Jan 24 '18 at 9:04
  • Isn't NMM a symbolic link? Like said before, output of ls -l will help. Otherwise we can just guess. – Kevin Lemaire Jan 24 '18 at 9:27
  • Works for me on Linux (source and target), also on symlinks. Could be a Windows issue. – Murphy Jan 24 '18 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 Feb 1 '18 at 8:53
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 administrator@10.6.120.80://D:/NMM/  ./
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.