Generate a key pair

ssh-keygen -t rsa

Copy key to clipboard

cat ~/.ssh/ | xclip -sel clip

Mount directory on remote server over ssh

sshfs /local/folder/path -o IdentityFile=/full/path/to/private/key/file -o allow_other

Copy a file from B to A while logged into B

scp /path/to/file username@a:/path/to/destination

Copy a file from B to A while logged into A

scp username@b:/path/to/file /path/to/destination

Prefer password authentication over public key

ssh -o PreferredAuthentications=password -o PubkeyAuthentication=no

Use a non-standard port

ssh user@ -p 26

Socks tunnel

ssh -D 8123 -f -C -q -N

-D: Tells SSH that we want a SOCKS tunnel on the specified port number
-f: Forks the process to the background
-C: Compresses the data before sending it
-q: Uses quiet mode
-N: Tells SSH that no command will be sent once the tunnel is up

Verify that the tunnel is up and running:
ps aux | grep ssh

If using -f close the tunnel
kill process-id