How to copy a file from my linux machine to remote window machine
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How to copy a file from my linux machine to remote window machine
I am able to copy the file from window machine to linux machine via pscp but i wanted to know is there any command by which i can copy the file from linux machine to windows machine.
Please help if anyone know about the same.
Thanks in Advance.
it depends on what is installed on windows. If you have shared a directory (and C$, D$ usually available) you can mount it on your linux and a simple copy should do the job.
Thanks pan64 for your rply .
So I cant use SCP to copy the file from linux server to window server ??Can you share me the steps how can i share the directory of window server and mount it to the linux server .
NOTE: both linux and window server are remote .
I think that the best general approach is to "bloom where you are planted." In other words, connect to the remote system using standard network file-sharing in a manner most-well supported by that host. Linux, Samba, etc. makes it easy to connect to a Windows shared network, and to participate fully in such a network as a true peer. Thus, you simply mount the share (logging-in to the Windows network unless it automagically recognizes you), and copy the files to-and-fro as you see fit. Exactly as you would do if you weren't (ick ...) using Linux.
He doesn't need to run a webserver on linux. Linux already has ssh running. He already knows how to use pscp to copy files from windows to linux. He just needs to learn how to use pscp to pull files from linux to windows.
Most Linux distros come with Samba client installed. Check your distro to find out whether it does. You do not need Samba server for what I will describe below.
Share a Windows directory in the Windows directories property dialog. Be sure to use simple sharing. Do not use Windows homegroup sharing; it works only with other Windows devices. Preferably the directory should be within your C:/users/[username] directory.
Put the file into that shared directory on the Windows machine.
Open the file manager on the Linux machine and browse to the shared directory on your Windows machine. If your file manager does not discover the directory, you can enter the Windows machine into the address bar of your file manager, like this
Code:
smb://[ip address of Windows machine]
Find the file and copy and paste it to the target directory on your Linux machine.
If you run into any problems, post them to this thread, including any error messages you get.
The "putty" package on the Windows side is a good, reliable client. Yes, they prefixed the letter "p" to all of their command-names, which is actually rather annoying, but otherwise it's directly on-par with the Linux equivalents. Their SSH-agent is called "pagent." (Or is it the English word, "pageant?" I don't recall.) Anyhow, everything you need to do SSH from the Windows world, and I believe also to provide an SSH daemon on Windows, is all there.
If you can access the remote Windows machine using RDP, then you can use the '-r disk:' option to rdesktop (a Linux RDP client) to have a directory on your Linux machine appear in the Windows file manager.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.