I need to copy a file from remote machine(which is using Windows OS) to my machine(It also uses Windows OS) using ssh in java.So i used JSch sample code exec to do this work.In this i gave scp command to copy files.but i always get -1 as returned value.Even i used ScpFrom sample code which also didnt work in my case.In some case It returned
Unable to execute command or shell on remote system: Failed to Execute process. exit-status: -1
other cases (i.e) used different slashes or path and it returned only
scp command used
scp -f user@ipadress:\user\folder\file.txt \user1\folder2
user-username of remotemachine
i even changed the slashes to forward one or with double slash.All things failed.
does freesshd server supports SCP?
Could any one help me in figure out the problem. Thanks in advance.