4 ms·
What problems are solved by agent forwarding that aren't solved by ssh -J/-o ProxyJump?
by andreareina 5y ago
What problems are solved by agent forwarding that aren't solved by ssh -J/-o ProxyJump?
- citrin_ru 5y agogit/hg clone from a remote host (using ssh key auth)
- tryauuum 5y agoI need both agent forwarding and ProxyJump. Imagine there is a bastion host and hosts X and Y (that don't have public IPs and are reachable from bastion) I use ProxyJump to get to host X, but I also need ssh-agent forwarding to copy files directly from host X to host Y. Luckily I don't need to copy files in such way in every interactive session so I guess I can disable agent forwarding by default
- andreareina 5y agoYeah I can see that. How about something like $ ssh -J <bastion> hostX base64 srcfile | ssh -J <bastion> -t "base64 -d /dev/stdin > dstfile" Having to use the local machine as an intermediary is a bit hacky but I know something like this is how emacs handles remote files (IIRC it also uses gzip).
- tryauuum 5y agono, it's way too hacky, don't want to copy several GBs of files through the intermediary my colleagues used approach with manually launching nc on hosts X and Y to avoid using the intermediate host. But that's also hacky ( though probably faster than ssh due to lack of encryption )
- andreareina 5y agoSeems like the answer is, "run arbitrary ssh-based commands on remote1 targeting remote2".