Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using PuTTY on Windows 7 to SSH to my school computer lab. Can I transfer files from my Windows machine to my user on the school machines using SSH?

share|improve this question
up vote 19 down vote accepted

Use the PSCP tool from the putty download page:


PSCP is the putty version of scp which is a cp (copy) over ssh command.

PSCP needs to be installed on your windows computer (just downloaded, really, there's no install process). Nothing needs to be installed on the school's servers. PSCP and scp both use ssh to connect.

To answer the usage question from the comments:

To upload from your computer to a remote server:

c:\pscp c:\some\path\to\a\file.txt user@remote:\home\user\some\path

This will up load the file file.txt to the specified directory on the server. If the final part of the destination path is NOT a directory, it will be the new file name. You could also do this to upload the file with a different name:

c:\pscp c:\some\path\to\a\file.txt user@remote:\home\user\some\path\newname.txt

To download a file from a remote server to your computer:

c:\pscp user@remote:\home\user\some\file.txt c:\some\path\to\a\


c:\pscp user@remote:\home\user\some\file.txt c:\some\path\to\a\newfile.txt


c:\pscp user@remote:\home\user\some\file.txt .

With a lone dot at the end there. This will download the specified file to the current directory.

Since the comment is too far down, I should also point out here that WinSCP exists providing a GUI for all this, if that's of interest: http://winscp.net/eng/download.php

share|improve this answer
I can't install anything on the university computers of course. Do I need to? – Alex Mohr Sep 27 '13 at 22:39
Is the windows 7 machine yours or your schools? I read the question to suggest that your are using putty on your computer to connect to the school's. If that is the case, then you do not need to install anything on the school's computer, but you will need to on yours. – SuperMagic Sep 27 '13 at 22:40
I'm using my windows 7 machine. thanks! I found the wget command and I used dropbox to transfer the file, but I'll keep this in mind for sure – Alex Mohr Sep 27 '13 at 22:42
One more thing: scp works both ways. You can upload as well as download with it. – SuperMagic Sep 27 '13 at 22:44
I'm having a bit of trouble with the syntax of the command. Is it: pscp source "path_to_local_file" user@host:path_to_new_location ? I got it to work with leaving the path on the remote machine blank, it just put it in my root directory. – Alex Mohr Sep 27 '13 at 22:49

You might have to use forward slashes (/) to talk with LINUX/UNIX servers

c:\pscp c:\some\path\to\a\file.txt user@remote:/home/user/some/path
share|improve this answer

You can just ball a lot of files up with tar:

tar -cz . | ssh me@school -- 'tar -C/path/to/target/dir -xz'

...which would recursively compress and stream all files in the current directory on the local machine to the target path while simultaneously uncompressing and expanding the stream on the remote machine.

You can do similar things for anything that writes to stdout. cat is an obvious choice:

cat ./localfile | ssh user@remote 'cat >./remotefile'
share|improve this answer
Great. How to do it in Windows – Joe Jul 24 '15 at 14:28
@Joe - the same way? Maybe <./localfile putty user@remote 'cat >./remotefile' - I forgot all of the putty switches. But it's pretty close – mikeserv Jul 24 '15 at 14:38

Try what I think is a much easier tool to accomplish this, winscp. Just download run and then connect to your server. It provides a simple drag and drop UI.

share|improve this answer
Not clear what relation this has to the question asked. Unless it's just the name of a client program, and the rest is junk. – Tom Hunt Sep 8 '15 at 22:51

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.