|
Secure Shell
Re: How do I use ProxyCommand to connect to remote host using shared session enabled by ControMaster? Feb 08 2011 10:24AM Igor Bukanov (igor mir2 org) (2 replies) Re: How do I use ProxyCommand to connect to remote host using shared session enabled by ControMaster? Feb 08 2011 03:08PM Asif Iqbal (vadud3 gmail com) (1 replies) Re: How do I use ProxyCommand to connect to remote host using shared session enabled by ControMaster? Feb 08 2011 03:16PM Asif Iqbal (vadud3 gmail com) (1 replies) Re: How do I use ProxyCommand to connect to remote host using shared session enabled by ControMaster? Feb 08 2011 02:35PM Igor Bukanov (igor mir2 org) (1 replies) Re: How do I use ProxyCommand to connect to remote host using shared session enabled by ControMaster? Feb 08 2011 02:51PM Asif Iqbal (vadud3 gmail com) (1 replies) Re: How do I use ProxyCommand to connect to remote host using shared session enabled by ControMaster? Feb 08 2011 02:53PM Asif Iqbal (vadud3 gmail com) |
|
Privacy Statement |
> On Tue, Feb 8, 2011 at 10:08 AM, Asif Iqbal <vadud3 (at) gmail (dot) com [email concealed]> wrote:
>> On Tue, Feb 8, 2011 at 5:24 AM, Igor Bukanov <igor (at) mir2 (dot) org [email concealed]> wrote:
>>> On 8 February 2011 04:20, Asif Iqbal <vadud3 (at) gmail (dot) com [email concealed]> wrote:
>>>> Is it possible to make it work as default for all hosts except the jumphost?
>>>>
>>>> I tried to replace the remotehost with `*' and then tried to fresh
>>>> start, like below
>>>
>>> I suppose you cannot do that since host * provides defaults for all
>>> hosts irrespective of the order. You can try to add an empty
>>> ProxyCommand to jumphost.
>>>
>>
>> Hopefully I am not pushing it :-) , but is it possible to factor in
>> the IP network I am connecting from in my config file?
>>
>> So if I am connecting from 192.168.1.0/24 block, usually when I am
>> home, *only* then login to remotehost using the proxy command.
>>
>> But if I am connecting from 10.13.137.0/22 block, usually when at
>> work, do not use proxy command.
>
> I think I got it
>
> $ cat ~/.ssh/config
>
> host jumphost
> hostname jumphost.example.net
> ForwardX11 yes
> ControlMaster auto
> ControlPath ~/.ssh/%r@%h:%p
> ProxyCommand none
> host from="!*.ad.work.com"
> ProxyCommand ssh -T -a jumphost nc %h %p
host from="!.*.ad.work.com" won't work.
so I still need to find out if it is possible?
That is, can I modify the .ssh/config in such that if I am coming from
corporate network don't use the proxy command ?
I use the same laptop from work and home. So I will have the same
.ssh/config file.
When I am connecting from home the proxy command works fine. But I
like to disable the proxy command when
I am connecting from work, because I do have direct access to the
remotehosts. No need to jump through jumphost.
>
> So it skips the proxy command now when connecting from work. I will
> test some more from home.
>
> Thanks again!
>
>>
>>
>>
>>
>>
>> --
>> Asif Iqbal
>> PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
>> A: Because it messes up the order in which people normally read text.
>> Q: Why is top-posting such a bad thing?
>>
>
>
>
> --
> Asif Iqbal
> PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
> A: Because it messes up the order in which people normally read text.
> Q: Why is top-posting such a bad thing?
>
--
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
[ reply ]