SCP

Bash: A Simple Script for Copying Files and Directories with SCP

This is a followup, of sorts, to an earlier post on file sharing in Xubuntu--which can be kind of a pain. I never looked seriously at SCP as a solution for file sharing because it's honestly tedious--true for both in-network and out-of-network sharing. With a little Bash scripting, though, SCP can be made a lot more practical. Here are a couple of short scripts that take the edge off.

Background

SCP is a command-line tool for passing files from one computer to another with SSH. That makes it a valuable tool no matter where those computers are: inside your home network, or off on some remote. The trouble I've always had with it, though, is remembering addresses: I can never remember the IP address of each and every device on my network, and some of the remotes I work with have really convoluted sub-domains. If it weren't for this, SCP would be a really great way to pass files from one place to another.