I am trying to scp from a remote and I want to copy the whole filesystem (it is a small embedded linux device). SCP does not like the way I am trying it:
scp -r name@ip:/ ./local_folder
I get the following error:
error: unexpected filename:
And if I run it with -v the last message looks like so:
debug1: Sending command: scp -v -r -f /
Entering directory: D0755 0
Sink: D0755 0
error: unexpected filename:
If I instead do
scp -r name@ip:/etc ./local_folder
The same debug snippet looks like this:
debug1: Sending command: scp -v -r -f /etc
Entering directory: D0755 0 etc
Sink: D0755 0 etc
It is kind of hard to search, I cannot find any people with the same problem if I try search terms like "scp root directory slash unexpected filename" etc.
scp -r name@ip:/* ./local_folder
? – AdminBee Jun 22 '21 at 16:02scp -r name@ip:'/*' ./local_folder
– Chris Davies Jun 22 '21 at 16:12