I have a very simple script aliased in my .bashrc on a remote host that I frequently SSH into for work. It enables me to enter "pth" as a command, and that aliases to "bash /user/your/home/pathprinter.sh", which is as follows:
#!/bin/bash
NOWDIR=`pwd`
echo 'scp myname@remote.host.institution.name:'"$NOWDIR"
This enables me to fairly quickly scp a file from my local machine to the remote host or vice versa without having to type very much, because it echos the output, which I then click and drag to highlight, then copy and paste into another terminal window on my local machine.
If this script were stored on my local machine, I could write:
NOWDIR=`pwd`
echo 'scp myname@remote.host.institution.name:'"$NOWDIR" | pbcopy
and it would go straight to the clipboard. But if I most frequently am on the remote host when executing this command, and if I do not have sudo powers on remote host (I can still install things on a home directory or elsewhere, however) are there still ways to accomplish this? Anything to save a few seconds!