You are not logged in.
Pages: 1
Hi,
I need to pass through a proxy server to connect by ssh. For this, I have have the file:
~/.ssh/config
Host *
ProxyCommand corkscrew PROXYIP 8080 %h %p
But with this, I cannot connect to localhost because it will try to pass into the proxy.
I'm then looking for a way to say "use proxy for all host EXCEPT for localhost". Is it possible?!?
Thanx!
Offline
From the ssh_config manpage:
A pattern-list is a comma-separated list of patterns. Patterns within
pattern-lists may be negated by preceding them with an exclamation mark
(`!'.) For example, to allow a key to be used from anywhere within an
organisation except from the ``dialup'' pool, the following entry (in
authorized_keys) could be used:
Dl from="!*.dialup.example.com,*.example.com"
Offline
Thanx tam1138.
Unfortunately, I've tried this but doesn't work... I have tried "Host !localhost,*", "Host !localhost *", "Host * !localhost", "Host !myhostname *" but they all ignore the localhost part. As is it wasn't there.
Offline
Did you try "Host !localhost" ? I don't see it on the list there, and I think it's what you want. By using some combination of "!localhost" and "*", you're saying "not localhost" and "everything", in which case localhost gets matched by the latter.
Offline
I just tried it. The proxy setting is then never set. I can connect to localhost, but not to external servers...
Thanx again for your suggestion.
Offline
Huh. That seems broken to me. (Though I can corroborate your findings. )
This configuration worked:
Host localhost
ProxyCommand none
Host *
ProxyCommand corkscrew PROXYIP 8080 %h %p
Offline
YESS!!!!!!!!!!! It works!
Finally! haha thanx a million times
Offline
Pages: 1