Note that the "$" is not typed - it just indicates what you see in the terminal window prompt. Also note that for transfer to or from your Desktop you are working in the Terminal window from your Desktop, not the ssh server.
1. Copy a file from your desktop computer to the server:
$scp /path/to/local/file username@hostname:/path/to/remote/file
Example: Move the file "VoteForPedro.txt" which is located on your Desktop to a directory called "Pedro" located in your home directory on the server. This example assumes you are in the Desktop directory of the Terminal window.
2. Similarly you can copy a file from the server to the desktop of your computer:
$ scp username@hostname:/path/to/remote/file /path/to/local/file
Example: Move the file "VoteForPedro.txt" which is located in a directory Pedro in your Home directory to the Desktop of your computer. This example assumes you are in the Pedro directory of the server:
$ scp pedro@dynamite:/home/Pedro/VoteForPedro.txt /Users/napolean/Desktop/
3. You can also specify the port:
$ scp -P 1234 username@hostname:/path/to/remote/file /path/to/local/file