Considering I have connected via ssh to a remote host and I want to copy a file from that remote host to my local device:
I know that I can just copy that file from a shell on the local device by using something like:
> scp user@remote:/path/to/file ./
and be done with it.
But when I am already on the remote host and I have no idea what my local IP is, is there a way to specify a copy to the local machine to the directory I was when I connected via ssh?
> pwd /home/user/documents/stuff > ssh user@remote Connected to remote host > scp file.txt REMOTECONNECTION [==========] 100% Done. > exit > ls file.txt