Quantcast
Viewing latest article 8
Browse Latest Browse All 13

Answer by SpamapS for Download a file over an active SSH session

You may want to check out zssh, which is available in universe, and therefore available with

sudo apt-get install zssh

You need it on your ubuntu server and on your client, but basically when logged in with zssh, you just hit 'ctrl-@' and it brings up the "File transfer mode" which allows you to send files back down the pipe to your client machine, or upload them from client to server.

However, you don't have to re-auth or open a new window to scp.

If you're using ssh keys, and an ssh agent, you can quite easily do:

[enter]~[ctrl]-Z

Which will background ssh, and then just scp $!:/whatever/whatever .'

Once the file is transferred, fg to get ssh back.

If you aren't using ssh keys, you can still use the "ControlMaster" and "ControlPath" options added to recent OpenSSh versions, but that gets tricky, check man ssh_config


Viewing latest article 8
Browse Latest Browse All 13

Trending Articles