If you configure your terminal to work with zmodem (lrzsz package) you can send files through the ssh terminal w/o having to shell out to sftp whatnot. It makes the shell script completely seamless for light file duty. just do 'rz' file and iterm2 picks up the zmodem request, prompts me for a filename (gui), and VOILA transferrs to the remote session w/o having to exit ssh! Only limitation is <=4gb file size.
If you configure your terminal to work with zmodem (lrzsz package) you can send files through the ssh terminal w/o having to shell out to sftp whatnot. It makes the shell script completely seamless for light file duty. just do 'rz' file and iterm2 picks up the zmodem request, prompts me for a filename (gui), and VOILA transferrs to the remote session w/o having to exit ssh! Only limitation is <=4gb file size.