This post is an extension to/resolution of a previous post:
Logged in host ip address? [webmasterworld.com]
I finally got a little function going that will scp a file to your home machine from the remote machine you're interacting with:
function scpme()
{
scp $1 username@${SSH_CLIENT% * *}:./$2
}
This goes in .bashrc and the usage is
scpme foo.txt
or
scpme foo.txt foo-othername.txt
On the same note you can easily set the display with:
alias displayon='export DISPLAY=${SSH_CLIENT% * *}:0.0'
The ${SSH_CLIENT% * *} gets just the IP part from the $SSH_CLIENT variable.