Question: I want to copy a file (`home/remote_computer_user/Desktop/test1.txt`) from my remote office computer (a permanent URL + open port) to my home computer (`home/home_computer_user/Downloads/`).

How can I do this with shell commands in Linux?

My current thoughts:

1. `ssh <user>@<computer1address> -p <port>` - gives me a shell on the remote computer
2. (I think I should use `scp`, but I dont how exactly how in my case)

What are the exact commands I should use?

Answer: 
`scp` works, but you can also use `rsync`:

```
rsync -e 'ssh -p <port>' <user>@<computer1address>:Desktop/test1.txt ~/Downloads/

```

Most of the time `rsync` is a drop-in replacement for `scp`, i.e. with most `scp` commands you can just replace `scp` with `rsync` and it will work the same way. The only reason that isn't true for your case is that `rsync` doesn't have a `-p` option to specify the port (well, it does, but it only applies when rsync connects through its own native protocol, not over ssh). So you need to tell it to use an alternate ssh command that includes the port.

If your ssh server uses the standard port, or if you have the port configured in `~/.ssh/config` (in either case, this means you don't need to use the `-p` option when connecting with ssh), then you can just run

```
rsync <user>@<computer1address>:Desktop/test1.txt ~/Downloads/

```

In general, I prefer `rsync` to `scp` because it has many more options, and because if you're transferring a large number of files, rsync has the sense to skip ones that already exist on the destination system, cutting down on the amount of data that has to be transferred.
An alternative to scp that may be more familiar and is more suitable for multi-file transfers is sftp. It comes with all major versions of ssh that I've encountered.