To collect some data from a bunch of hosts I use a bash script which calls scp in a loop. Most of these hosts are configured for ssh public key authentication. I may skip those which have no key authentication and ask for password, ssh/scp options do the job:

-o BatchMode=yes or -o PasswordAuthentication=no

But there are also hosts for which ssh proxy should be used, as it's set up in


ProxyCommand /usr/bin/ssh -qW %h:%p <jumphost>

In such a case any ssh/scp options apply only to the first command and I still get a password prompt from the proxy command.

Is it possible to pass options to the proxy command (without editing the configuration file)?

  • I do not think so. But you can have host-specific ProxyCommand(s). – Martin Prikryl Jan 3 at 13:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.