Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
HI everyone.
I'm running SSHD on my Linux box and I connect to it from a WindowsXP box with putty, I made a user and password on my Linux box to connect to it, now when I connect I see the home directory and everything, what I want to know is how do I transfer a file from Linux to WIndows, I try using the scp command but I guess I'm doing something wrong. This the command I used.
scp john@192.168.0.4:~/Documents/file_to_copy .
Where is the file suppose to be when I enter that command? and how would I tell the machine where to download the file to, for example download it to "c:\windows".. This is kind of confusing because when I read that command I understand that by the "." which mean "current directory" the file is copying itself on my linuxbox and not on my windows box. I hope you guys understand me. I read the man page.
Do you have to use a command line interface? If not, why not try WinSCP ? It's an open source SCP client with an easy to use GUI, when I used to use windows (all those years ago) I could never be bothered to use the command line interface - WinSCP makes things a lot easier, especially when you are moving multiple files.
If you want to use the command line interface, just say so and someone else will help you
You need to run scp(a utility called pscp.exe is available on Putty website, thats a Windows client) on the Windows box, not in the ssh session.
You open up the command prompt and execute something like this:
And GaijinPunch is right, you can't use tilde to represent your home dir because Windows command prompt shell won't recognise it, and even if it does the paths are different.
Thanks guys, I will try pscp when I get home today. I know the way I'm typing the command works because I can copy files between my linux boxes with no problem with this command
scp user@host1:file user@host2:file
The error I get when trying to copy a file from Linux to windows is this one
ssh: connect to host 192.168.1.103 port 22: Connection refused
lost connection
Which is weird because I don't have a firewall up, I disable the WindowsXP firewall too.
Just to clear things up you got connection refused because in order to specify user@host:/path/tofile as either the source or the target the host has to be running sshd, which means your Windows also needs to have sshd running.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.