The difficulty here is that you appear to want to pass things like password information in to your ssh command via scripting, but the OpenSSH-based '
ssh' command itself doesn't support passing in the password on the command line (for security reasons, I'd be willing to wager).
If you need to connect via a jump host running the '
ssh' command, you will have to handle -
within the script itself - all the possibilities that could arise from such a command. Much of this is already demonstrated in the
"Jump Host - Handle Secondary Host Connection Attempts" example.