title: SSH - a way to transfer files without opening a separate SFTP session?
body: <p>Not really a programming question, but relevant to many programmers...</p>
  
  <p>Let's say I have opened an SSH session to another computer.</p>
  
  <blockquote>
    <p>remote:html avalys$ ls <br>
    welcome.msg index.html readme.txt <br>
    remote:html avalys$</p>
  </blockquote>
  
  <p>Is there any command that I can type in my remote shell that will immediately transfer one of the files in the current directory (e.g. welcome.msg) to my local computer, i.e.</p>
  
  <blockquote>
    <p>remote:html avalys$ stransfer welcome.msg <br>
    Fetching /home/avalys/html/welcome.msg to welcome.msg <br>
    /home/avalys/html/welcome.msg 100%   23KB  23.3KB/s   00:00 <br>
    remote:html avalys$</p>
  </blockquote>
  
  <p>The only way I know of to do this is to open a parallel SFTP session and CD to my current directory in the SSH session, which is a real PITA when administering a server remotely.</p>
  
  <p>EDIT: I am aware of the possibility of using a reverse sftp/scp connection, but that involves more typing. It would be great if I could type just the name of some command (e.g. "stransfer"), and the file(s) I want transferred, and have it Just Work.</p>