Feature request: "SetupCommand" invoked before connecting
Helmut Grohne
helmut at subdivi.de
Tue Jul 14 16:37:38 EST 2009
Hi Peter,
On Tue, Jul 14, 2009 at 12:47:09AM +0200, Peter Stuge wrote:
> How do you mean alias? Shell alias? No, that's not the wrapper script
> that was suggested, so it doesn't do the trick.
A shell alias was the original suggestion.
> Sorry, I don't understand which disadvantages you refer to. The
> suggestion is to rename the original ssh binary from ssh to for
> example ssh.orig and then to create a script named ssh which does
> everything you need, before finally execing ssh.orig.
The disadvantage of parsing ssh options was kindly explained by Daniel
in a follow up post, thanks!
What I mean with separating configuration is that I'd have to store what
commands execute before which ssh somewhere. One option is to add a
second configuration file. Now ssh configuration is stored at two
places. This is not a big problem, but considered a disadvantage. The
other option is to encode this configuration in comments to be added to
~/.ssh/config like for instance "#@SetupCommand foo". It really is a
hack. Additionally a configuration parser is needed now. On the other
hand it now integrates nicely with host specifications.
Yes, all this is doable and I can also create a software for that. Would
you include such a wrapper in the ssh distribution? This sounds silly.
What I'd like to see is the ability to use machine X (not maintained by
me) and be able to use port knocking easily. This is easy when all
distributions ship an openssh that provides something like SetupCommand.
Replacing the ssh command is tedious, so it will not happen in practise.
Instead workarounds like abusing ProxyCommand will be used.
Helmut
More information about the openssh-unix-dev
mailing list