I want to do the following:
scp email@example.com:/root/file.txt ~/homecomputer/directory
Instead of taking a file from the server though, I would like to send a file. How do I do this?
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
The syntax is:
scp source destination
So this time the source is your local (client) computer and the destination is the remote (server) computer.
If the file you want to send is
~/homecomputer/directory/foobar.txt, then from your local computer you can do:
scp ~/homecomputer/directory/foobar.txt firstname.lastname@example.org:/where/to/put
man scp to get more idea on this.