1

Trying to copy from PC A to PC B but getting network error

  • Username and password are correct
  • Firewall is off
  • Able to ping each other
  • Folder C:\PCB to C:\B

I tried:

PSCP.exe -pw 1qaz@WSX [email protected]:/PCB/*.* C:\B

Fatal: Network error: Connection refused

Ahmed Ashour
  • 2,350
  • 2
  • 14
  • 21
user935892
  • 71
  • 2
  • 9
  • 1
    What SSH server have you installed on 10.0.0.2? – u1686_grawity Aug 24 '18 at 06:41
  • can it work without SSH installed on both computers? – user935892 Aug 24 '18 at 06:48
  • [SCP](https://en.wikipedia.org/wiki/Secure_copy) is based on SSH. In your case you need an SSH server on the remote (`10.0.0.2`) machine; SSH server (if any) on the local computer is irrelevant because your target "address" (`C:\B`) is just a local path. So what SSH server have you installed on `10.0.0.2`? – Kamil Maciorowski Aug 24 '18 at 06:55

1 Answers1

4

Since PuTTY's pscp is an SFTP (SSH file transfer) client, it needs an SSH & SFTP service to be installed on the remote computer. Windows does not have one by default, and so you get "Connection refused" because nothing is listening on the SSH port.

To make pscp work you'll need to install, for example, OpenSSH that comes with Windows 10, or Bitvise WinSSHd, or OpenSSH via Cygwin.

Your alternative option is to use regular Windows' "file sharing" (SMB). Share a folder on PC A and copy the files directly using copy/xcopy/robocopy.

u1686_grawity
  • 426,297
  • 64
  • 894
  • 966