Hi OpenSSH'lers!
While using OpenSSH for quite a while, I became annoyed with the
inflexible config-file parsing algorithm. I special it did not
alow me to express: "Use *no* proxy for host xyz, but *this* proxy
for all other hosts".
So I had a look at the source an make a quick-n-dirty change, allowing
me to use the special ProxyCommand "None" to express "don't
use a proxy".
Today I had to rework the patch, because the current version of the
config-file lexer/parser leaves no space in from of the keyword anymore
(gooood), but keeps a trailinh carriage-return (bad).
Anyway, the patch is attached. Hopefully it's usefull not only to me.
Usage is this way:
Host internal-machine
ProxyCommand None
Host *
ProxyCommand <any-proxy-command>
Best regard
Olaf
--
Olaf P?schel, Softwaretechnik, OLMOS Workstations GmbH, Germany
Wolfenb?tteler Str. 31A, 38102 Braunschweig, Fon.: +49-531-22020-0 Fax: -99
OLMOS supports signed and/or encrypted mail. Grab my key at www.keyserver..net
"Unix *is* user friendly. It's just a bit picky about its friends"
-------------- next part --------------
*** sshconnect.c Mon Dec 23 03:06:20 2002
--- sshconnect.c.patch Mon Apr 14 14:52:20 2003
***************
*** 47,52 ****
--- 47,56 ----
#define INET6_ADDRSTRLEN 46
#endif
+ #ifndef PROXY_NONE
+ #define PROXY_NONE "None\n"
+ #endif
+
static int show_other_keys(const char *, Key *);
/*
***************
*** 258,264 ****
port = SSH_DEFAULT_PORT;
}
/* If a proxy command is given, connect using it. */
! if (proxy_command != NULL)
return ssh_proxy_connect(host, port, proxy_command);
/* No proxy command. */
--- 262,268 ----
port = SSH_DEFAULT_PORT;
}
/* If a proxy command is given, connect using it. */
! if (proxy_command != NULL && strcmp(proxy_command, PROXY_NONE))
return ssh_proxy_connect(host, port, proxy_command);
/* No proxy command. */