https://bugzilla.mindrot.org/show_bug.cgi?id=1977
Bug #: 1977
Summary: ProxyCommand seems to no execute shell commands
Classification: Unclassified
Product: Portable OpenSSH
Version: 5.9p1
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: ssh
AssignedTo: [email protected]
ReportedBy: [email protected]
Hi.
The manpage says to ProxyCommand:
>The command string extends to the end of the line,
>and is executed with the user's shell.
So I'd have assumed that the following works:
Host *.exmaple.org
ProxyCommand ssh -W %h:%p gateway1.exmaple.org || ssh -W %h:%p
gateway2.exmaple.org
But it doesn't, even not in modifications like:
ProxyCommand { ssh -W %h:%p gateway1.exmaple.org ; } || { ssh
-W %h:%p gateway2.exmaple.org ; }
or so.
Is this intentional or a bug?
What works however is explicitly invoking another shell:
ProxyCommand sh -c "ssh -W %h:%p gateway1.exmaple.org || ssh -W
%h:%p gateway2.exmaple.org"
but this shouldn't be necessary, should it?
Thx,
Chris.
btw: I guess my intention is clear, if the gateway1 fails, use
gateway2. Is there a better way for doing this?
--
Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
_______________________________________________
openssh-bugs mailing list
[email protected]
https://lists.mindrot.org/mailman/listinfo/openssh-bugs