I am connected to windows machine via a VPN network. I installed openssh server on windows machine. From Ubuntu machine, I can connect using:
ssh windowsmachine@ipaddress
However:
scp windowsmachine@ipaddress:D:\MyFolder\myprogram\ .
does not trigger any error but does not copy anything.
Now connecting on windows machine and try to ping ubuntu machine:
ping 10.x.x.x (ubuntu ip) does not work (time out)
Same thing for:
scp ubuntumachine@ipaddress:/home/ubuntumachine/Downloads/
-vvvwith the scp command. It should work version the versions of OpenSSH are accurate – Ramhound May 12 '21 at 17:53scp.scp ubuntumachine@ipaddress:/home/ubuntumachine/Downloads/is an obvious case. Inscp windowsmachine@ipaddress:D:\MyFolder\myprogram\ .invoked in a shell in Linux, each backslash will escape the next character, including the space just before.. – Kamil Maciorowski May 12 '21 at 17:53scp windowsmachine@ipaddress:D:\\MyFolder\\myprogram\\ .– BetterEnglish May 12 '21 at 18:01scpjust usessshto run a command starting withscpon the remote side (see "what happens under the hood" here). In nix the shell handles quoting, in Windows the executable itself (herescp) handles the rest of the command string. It can use a standard function for this (whose rules are different than these in nix shells) or provide its own. For these reasonsscp(especially between different OSs) is awful. – Kamil Maciorowski May 12 '21 at 18:13