One can log into a remote shell via SSH, and one can use an FTP application to log in via SFTP using the same credentials over SSH. How then, does one initiate a file transfer from the remote host to the local host when logged into a shell via SSH?
I know that I could use scp or rsync to move the files, but the requires authenticating which is not something that I can always do from the host. From my limited understanding the existing SSH connection is all that should be needed, as SSH has file transfer capability.
Thanks.
So from local host A, you log in to remote host B, and want to transfer a file from B back to A?
You need a server of some sort on A to handle the request, or pull it from B when you’re logged in to A.
Is it possible to set up authorized_keys on the servers to facilitate password-free authentication?
EDIT: On *nix hosts, you can get the package zssh on A and lrzsz on B. Then instead of
ssh Byou runzssh B, cd to the directory you want to get a file from, runsz file.namethen hitctrl+spaceand enterrz, and it will transfer locally. Other clients may have other methods.