Skip to content

Comment on SSH tricks

Comments

SSH is capable of running multiple channels over the same SSH connection. In theory this means you could ssh to a remote host, then establish a second channel to transfer a file over. Why the heck does the ssh tool not actually allow this sort of capability? Why do I have to establish a second scp or sftp connection to transfer a file when I'm already ssh'd into the machine? I don't get it.

If you use ControlMaster & ControlPath in ~/.ssh/config, sftp will use the existing connection.

Sure, but that's not really relevant to my point. That's just a minor optimization, but my workflow is still exactly the same: start up sftp, re-navigate back to the same directory, and do the transfer.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.