Forum Moderators: bakedjake
If I know the host name I can do it:
function scpme()
{
scp $1 me@my.home.mahcine.hostname.net:./$2
}
But I want it to work regardless of where I'm logged in from, not just the hardcoded my.home.mahcine.hostname.net.
So the simple question is: is there a shell variable like $REMOTE_HOST that stores the IP I'm logged in from?
Additionally, ssh reads $HOME/.ssh/environment, and adds lines of the format ``VARNAME=value'' to the environment if the file exists and if users are allowed to change their environment. For more information, see the PermitUserEnvironment option in sshd_config(5).