I need to transfer files from my local computer on windows 7 to a server running linux. I access the server with putty through ssh at a specific IPv4 address and port number.

I've attempted using the pscp command from my local computer but was denied access by the server. "Fatal: Network error: Connection refused"

 c:>pscp test.csv userid@**IPv4_Addres***:Port# /path/destination_file_name.

Either the server blocks all pscp attempts from unauthorized users (most likely my laptop included) or I used the command incorrectly.

If you have experience using this command, where exactly will the file get transfered to, I'm assuming that the path destination starts at my home directory in the server.

Also if you have any other alternative methods of transfering the files let me know.

Update 1

I have also tried using WinSCP however I got permission denied for that as well, it looks like the server will not let me upload or save files.


I had a complete lapse of memory and forgot about sudo (spent too much time with scripts the last 2 months), so I was able to change the permissions to allow external editing. Thanks for all the help guys!

  • Do you have permission to write to "path"? Do you have permission to create new subdirectories and/or files in your home directory? – Ƭᴇcʜιᴇ007 Jun 24 '13 at 14:19
  • No I don't, but I tried using someone else's directory that did have those permissions and it still didn't work. – Mason Jun 24 '13 at 14:21
up vote 4 down vote accepted

You've got the command line wrong. It should be

pscp -P <port> test.csv userid@<host>:path/destination_file_name

(see http://the.earth.li/~sgtatham/putty/0.53b/htmldoc/Chapter5.html#5.2)

  • That worked great, I get past the initial error and am prompted for my pasword, but still have permission denied for some reason. "pscp: unable to open /directory/test.csv: permission denied" – Mason Jun 24 '13 at 14:33
  • @Mason That means you don't have permission to write to /directory/test.csv Make sure you can write to the directory (ls -l / | grep directory) – Darth Android Jun 24 '13 at 14:44
  • The permissions are "-rw-r--r--" so I should be able edit it as I have r&w permissions. Does this mean that pscp is considered other? I also tried changing the permissions of the file using chmod but I got "Operation not permitted"...guess I'm going to have to go and get myself some more permissions. – Mason Jun 24 '13 at 14:57
  • 2
    user = rw /group = r / everyone = r -- what user owns the directory? Also: /path/destination and path/destination are 2 different things. – MattPark Jun 24 '13 at 15:23

Your Answer


By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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