I'm currently using scp
to copy files between Linux systems.
scp username@hostname:/tmp/test.file .
Which copies my file from the remote server to the local machine.
What I would like to do is use the same scp
command from my local Linux machine but copy a file from a Windows destination instead. How can this be accomplished?
You can use commands available with winscp
to do this on the command line.
winscp command line
This syntax is pretty close to the Linux scp
command - but with Window-ish flags.
You can find the winscp.exe
executable at this path:
C:\Program Files (x86)\WinSCP\winscp.exe
EDIT 01:
And if you want to use scp
on the Linux machine to copy from the Windows machine, you will need to run a ssh
server on the Windows box.
FreeSSHd
OpenSSH
EDIT 02:
If you cannot install a ssh
server on the Windows machine, you can mount an exported directory from Windows onto Linux using the samba fs mount
.
samba fs mount
Finally found a solution
Downloaded pscp and used commandline option and then scheduled a job
c:\pscp.exe -q -batch -l mramkumar -pw xxxxx "c:\alm_testlink.png" mgr.sjc:/home/mramkumar
Created a as bat file and scheduled as a job, This will keep pushing all the files in the folder to my linux server without prompting any password
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With