0

I installed git for windows on a windows7 host. The git for windows comes with a program called git bash .I can use scp to transfer files to a linux host in a git bash window, as follows:

 MINGW64 ~
 $ scp  from-windows-file  linuxuser@LINUX-HOST-IP:/home/linuxuser/

but when i transfer files back to a git bash window from a linux host ,scp not work , as follows:

 $ scp  from-linux-file   winuser@WINDOWS-HOST-IP:/c/Users/winuser/

I got an error:

ssh: connect to host WINDOWS-HOST-IP port 22: Connection refused
lost connection

How can i transfer files back to a git bash window from a linux host?

0

You should remain in mingw64-shell and do:

$ scp linuxuser@LINUX-HOST-IP:/home/linuxuser/from-linux-file .

it will copy the file to the current directory keeping the filename.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.