> Date: Sun, 26 Nov 2017 02:09:13
> From: Sebastian Benoit <be...@openbsd.org>
> To: Holger Mikolon <hol...@mikolon.com>
> Cc: tech@openbsd.org
> Subject: Re: diff for ssh/sftp/scp -j
> 
> Holger Mikolon(hol...@mikolon.com) on 2017.11.25 23:16:54 +0100:
> > Hi tech@
> > 
> > at work I can ssh (hence cvs) to public servers only via a ProxyCommand
> > specified in /etc/ssh/ssh_config.
> > 
> > However, with the ProxyCommand set I cannot ssh into servers in the
> > internal network. So I end up changing ssh_config depending on my
> > use case over and over. This bothered me enough to come up with the
> > following simple diff. It adds a command line option -j to ssh/sftp/scp
> > for ignoring the ProxyCommand. Of course "-j" can be changed to any
> > other free letter.
> > 
> > Anyone else finding this useful? Comments?
> 
> well, you could also just have two config files and use
> 
>   ssh -F $HOME/.ssh/config_with_proxy
> 
> and since thats too long to type
> 
>   alias sshp="ssh -F $HOME/.ssh/config_with_proxy"
> 
> imho not worth yet another option.
> 
> /Benno

Thanks Benno, Stuart and Jiri for your responses.

An alias doesn't work with cvs over ssh, at least not when I do:
   $ alias sshp="ssh -F $HOME/.ssh/config_with_proxy"
   $ export CVS_RSH=sshp"
   $ cvs up 

CVS_RSH doesn't like flags/parameters either. I haven't figured out
a way to pass ssh flags to cvs (via CVS_RSH), except by creating a
simple script /usr/local/bin/sshp which calls ssh with my favorite
flags.

I have used various ssh_config setups with and without domain specific
blocks but never came to a config that worked everywhere (likely my
fault). On top of that I use my OpenBSD laptop at work (proxy needed)
and as well at home (no proxy needed for the exact same destination).

So I will continue with custom scripts (or aliases for the non-cvs 
cases). No big deal.

Regards,
Holger
;-se

Reply via email to