Americas

  • United States

Asia

Oceania

roger_grimes
Columnist

Securely copy files

Analysis
Dec 31, 20062 mins
Data and Information SecuritySecurity

Use Putty's Pscp.exe to securely copy files between computers. Everyone frequently needs to copy files to and from different computers, even over the Internet. I still see a lot of unsecured FTP used, when it should have been retired long ago. Consider instead any one of the hundreds of more secure alternatives. My favorite? scp (Unix, Linux, BSD) or Pscp.exe (Windows). Scp and Pscp.exe using SSH to securely (en

Use Putty’s Pscp.exe to securely copy files between computers.

Everyone frequently needs to copy files to and from different computers, even over the Internet. I still see a lot of unsecured FTP used, when it should have been retired long ago. Consider instead any one of the hundreds of more secure alternatives.

My favorite? scp (Unix, Linux, BSD) or Pscp.exe (Windows). Scp and Pscp.exe using SSH to securely (encrypt files and authenticate destinations) copy files from one computer to another. Most Linux, Unix, and BSD hosts already have scp (secure copy). Windows doesn’t have any default utilities like scp, but the programmers of Putty (the fantastic, free SSH Windows client), offer very similar Pscp.exe. You can download Putty or Pscp.exe here.

With scp or Pscp.exe you can copy files over temporary SSH tunnels between source and destination. The only problem is that at least one of the machines has to be running an SSH server/daemon. Most Unix, Linux, and BSD’s have that (i.e. sshd). If you don’t have one, follow my yesterday instructions on loading OpenBSD, and it will easily load an sshd service. Then you can use the OpenBSD box/image to copy files.

I like to copy Pscp.exe to WindowsSystem32 and rename it scp.exe, so I can use scp in Unix, Linix, BSD, and Windows without thinking about it.

Syntax is basically like the DOS copy command:

scp [from where if not there] [what] [to where?]

but you have to add a logon name, the @ sign, and machine name/IP address for the remote machine, so the syntax is:

scp [from where if not there] [what] [logonname]@x.x.x.x:[to where?]

Examples of syntax, if I’m on the box I’m copying from:

scp *.* roger@192.168.4.1:/

scp frog.tar roger@www.banneretcs.com:/tmpExamples of the syntax if I’m on the destination box:

scp roger@192.168.5.6:c:/files/toad.zip Windowtemp

scp roger@www.banneretcs.com:toolsputty*.* c:newtools

Scp is free, works great across any TCP/IP network, across the network, and you can send it to customers to use, and automate in batch files and scripts.

Once you start using scp, you’ll probably never use ftp again.

roger_grimes
Columnist

Roger A. Grimes is a contributing editor. Roger holds more than 40 computer certifications and has authored ten books on computer security. He has been fighting malware and malicious hackers since 1987, beginning with disassembling early DOS viruses. He specializes in protecting host computers from hackers and malware, and consults to companies from the Fortune 100 to small businesses. A frequent industry speaker and educator, Roger currently works for KnowBe4 as the Data-Driven Defense Evangelist and is the author of Cryptography Apocalypse.

More from this author