I’ve been moving files between Linux servers, and to and from Windows boxes, as part of my server migration. I started to write about how I’ve been doing it, but it seemed oddly familiar.
Yep, I’ve written about SCP and its Windows port, PSCP, before. Do this long enough and you find yourself repeating yourself.
Sure, you could set up an FTP server, or install Samba, but it’s good security practice to have as little running as possible on a server, especially one whose primary job is to accept Internet traffic. SSH is something you need on the server anyway, for remote administration, so using SCP doesn’t compromise its security posture at all. And if you isolate the server behind its own dedicated firewall/router, SCP still allows you to move files back and forth to it, without opening any additional ports.
One point of clarification from the original piece: Using the -c switch to turn on compression won’t help when sending files that are already compressed, like png or jpg graphics. But when moving, say, 36-megabyte SQL dump files, it helps a good deal.
David Farquhar is a computer security professional, entrepreneur, and author. He started his career as a part-time computer technician in 1994, worked his way up to system administrator by 1997, and has specialized in vulnerability management since 2013. He invests in real estate on the side and his hobbies include O gauge trains, baseball cards, and retro computers and video games. A University of Missouri graduate, he holds CISSP and Security+ certifications. He lives in St. Louis with his family.