2

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/

  • Your commands are incomplete. You've specified a source to copy from, which is good, but you forgot to specify a destination to copy to. – Spiff May 12 '21 at 17:36
  • @Spiff It is just copy past mistake. I specified a destination – BetterEnglish May 12 '21 at 17:43
  • The Windows machine and Ubuntu are connect to the same VPN, if that is the case, the machines should be able to reach either machine. – Ramhound May 12 '21 at 17:49
  • @Ramhound absolutely, it is really make me crazy! – BetterEnglish May 12 '21 at 17:50
  • @BetterEnglish - Try using `-vvv` with the scp command. It should [work](https://github.com/PowerShell/Win32-OpenSSH/issues/1097) version the versions of OpenSSH are accurate – Ramhound May 12 '21 at 17:53
  • There is no error message, so probably a deeper problem, but note in both cases you gave just one argument for `scp`. `scp ubuntumachine@ipaddress:/home/ubuntumachine/Downloads/` is an obvious case. In `scp 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:53
  • there is no networking problem. On linux, windows path should contains double \\. `scp windowsmachine@ipaddress:D:\\MyFolder\\myprogram\\ .` – BetterEnglish May 12 '21 at 18:01
  • … or it should be quoted right. In fact you often need to quote twice, because local `scp` just uses `ssh` to run a command starting with `scp` on the remote side (see "what happens under the hood" [here](https://superuser.com/a/1634882/432690)). In *nix the shell handles quoting, in Windows the executable itself (here `scp`) 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 reasons `scp` (especially between different OSs) is awful. – Kamil Maciorowski May 12 '21 at 18:13

1 Answers1

2

From reading over your notes, it would seem like you do not have network connectivity to the ubuntu machine.

I would definitely make sure that you're able to PING or at least able to reach it over any other kind of network ports depending on your infrastructure.

ICMP pings could be blocked, so that may be normal for your use case. This is why reaching over a different port may be better, just depending.

I would also recommend using WinSCP as the application. Just eliminate any configuration errors.

I hope this helps; cheers!

Jordan
  • 21
  • 2