0

I want to transfer a file from my Linux machine to the windows host it is on. I have read some other topics similar to this and they suggest using scp. I have tried:

 scp pathTolinuxFIle windowsHostname@WindowsIP:\C\Users

but it gives an error of "ssh: connect to host 'windows ip' port 22: Connection refused. lost connection".

Is there an alternate way to transfer files or a way to fix this issue?

1
  • Make sure you can network properly. In Linux (works in Ubuntu and Kali): smb://ipofwindows/foldertoaccess and press enter. I do this regularly and it works so something to consider.
    – anon
    Commented Apr 28, 2021 at 18:53

1 Answer 1

0

Sounds like the firewall on the target Windows machine might be blocking port 22. Try adding a port-specific rule allowing inbound TCP connections there.

If it were me I'd say either SMB or SFTP might be worth considering (only for my own lack of experience with SCP). Bitvise is an example of a pretty easy to use SFTP server with a free license for < 10 users.

1
  • Thank you for your reply. I ended up following your suggestion of using sftp. Commented Apr 28, 2021 at 19:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .