Command Line SCP for Windows

I do not use FTP, and you shouldn’t use it either. Sending your password and files over the tubes in plaintext form might have been ok in the 80’s but nowadays it’s just asking for trouble. I use scp for all my file transfer operations.

Now, as every self respecting geek I have cygwin installed on every windows box I use. But sometimes going through cygwin is an overkill. For example if I simply want to process and upload 1 small file to a remote machine I really shouldn’t have to install cygwin environment just to get access to command line scp version. I should be able to do this from an ordinary batch script.

This is where PuTTY comes into play. But wait, you say, PuTTY is a graphical SSH client for windows. What does it have to do with SCP? To that, I answer: “Very good question, voice in my head. Let me explain…”

If you go to to the official PuTTY download page and scroll down you will see a link to pscp.exe. What is that? It is exactly what I’m talking about here. A command line scp client for windows.

Just download it, rename it to scp.exe, stick it somewhere in your path and you are ready to go. It works almost the same like the real thing with few little exceptions. But it is great tool for automated upload scripts.

[tags]scp, windows, secure copy, ftp, putty, scp clients[/tags]

This entry was posted in sysadmin notes and tagged , . Bookmark the permalink.



3 Responses to Command Line SCP for Windows

  1. Craig Betts UNITED STATES Mozilla Firefox Solaris Terminalist says:

    Some of my customers want to transfer files through a gui, so I support WinSCP (http://www.winscp.net/). It will use the sftp or scp method behind the scenes. Best of all, it also will use pageant for the ssh-agent! WinSCP is the missing piece from PuTTY!

    Reply  |  Quote
  2. Luke UNITED STATES Mozilla Firefox Ubuntu Linux says:

    Yeah, winscp is a great tool. In fact there are many GUI applications that will do ssh, scp or both on windows. I just needed something that can be silently called from a batch file without any need for user interaction (eg. as part of a login script).

    Reply  |  Quote
  3. Pia Jensen SWITZERLAND Mozilla Firefox Windows says:

    Thanks for this – I didn’t know you could just use that small putty executable there for this – and I’ve always wanted scp on my Windows machines. So this, .., this was GREAT! :)

    Reply  |  Quote

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>