Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: scp file from windows10 to unix server

by kcott (Archbishop)
on Feb 18, 2020 at 13:53 UTC ( [id://11113106]=note: print w/replies, xml ) Need Help??


in reply to scp file from windows10 to unix server

G'day vinoth.ree,

I have Windows 10. I have an oldish ActivePerl (5.16.3) but not as old as your 5.8.8. I also have:

C:\Users\ken>dir C:\Windows\System32\OpenSSH\scp.exe ... 19-Mar-19 17:19 322,560 scp.exe ...

Locally, I created D:\tmp\sample.dat: it just contains the string "This is sample data."

Remotely, I checked for ~/tmp/sample.dat: not found.

Locally, I ran (via cmd.exe):

C:\Users\ken>perl -e "my $cmd = qq{C:\\Windows\\System32\\OpenSSH\\scp +.exe D:\\tmp\\sample.dat W\@X.Y.Z:/A/B/C/tmp/sample.dat}; qx{$cmd}" Password: C:\Users\ken>

Remotely, I now have ~/tmp/sample.dat which just contains the string "This is sample data."

Because the remote machine is a $work computer, I was somewhat loathe to publish details. You can probably work out: W is my username; X.Y.Z is the URL; and, /A/B/C/tmp is ~/tmp.

Hopefully, if you use the same "\\", "\" and "/" combinations as I did, your scp will work.

— Ken

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11113106]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (2)
As of 2024-04-19 18:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found