0

My ssh to a host "sees" one file system; my scp sees a different one. How can this be the case, and how can I fix it. e.g.

$ ssh me@otherpc 'ls -l /tmp/media-files.txt'
-rw-r--r-- 1 me me 194399 Apr 28  2022 /tmp/media-files.txt

$ scp me@otherpc:/tmp/media-files.txt /tmp/ scp: /tmp/media-files.txt: No such file or directory

1 Answers1

1

It turns out that 'otherpc' is running WSL2 and Windows' OpenSSH. otherpc's OpenSSH is configured to launch WSL's bash as the shell on login, so that explains why ssh see's the WSL file system.

But connecting via scp appears to be hard-wired to run the OpenSSH scp as a server, rather than WSL's. So scp "sees" the Windows file system.