You’re in Cape Town, but your data is in California. You’re using a Sun system in your office, but your bleeding-edge Mozilla browser with the very cool theme and all of your favorite bookmarks is on your Linux box at home. How can you get bits from there to here without being there?
You’re in Cape Town, but your data is in California. You’re using a Sun system in your office, but your bleeding-edge Mozilla browser with the very cool theme and all of your favorite bookmarks is on your Linux box at home. How can you get bits from there to here without being there?
Linux has more remote access solutions than you might realize. You’ve probably heard of scp and ssh. But did you know that you can run an X application securely through an ssh tunnel? Or that ssh can run almost any command line on the remote system — not just a simple command? Indeed, both (and more) are possible, so let’s dig in and learn how.
The secure file-copy command, scp, has a syntax like the Linux cp command: the first arguments are the files to copy and the final argument is the destination. Unlike cp, scp lets you copy files to and from a remote host. If you want to refer to a file on a remote host, simply prepend a hostname (and a username if it’s different than your local username) and a colon (:) to the file path and name.
For instance, to copy both the file .cshrc from your home directory on host foo.bar and the file prog from…
Please log in to view this content.
Not Yet a Member?
Register with LinuxMagazine.com and get free access to the entire archive, including: