[Feature Request] Allow options in Host block to override global options in ssh

Ashish SHUKLA wahjava.ml at gmail.com
Sat Aug 21 13:01:38 EST 2010


Hi everyone,

For ssh(1) to override global options with the options in "Host" block, the
attached diff (w.r.t. the openssh code in FreeBSD 8.1-R) contains the code to
do so while parsing ssh configuration file.

This is useful for case like following where {d,proj,p,n}cvs.FreeBSD.org is an
alias to ncvs.FreeBSD.org hostname, thus connecting to
{d,proj,p,n}cvs.FreeBSD.org should utilize the existing connection.

#v+
ControlMaster auto
ControlPath /tmp/%r@%h:%p

Host dcvs
Hostname dcvs.FreeBSD.org
ControlPath /home/abbe/.ssh/cvs.cpath

Host projcvs
Hostname projcvs.FreeBSD.org
ControlPath /home/abbe/.ssh/cvs.cpath

Host pcvs
Hostname pcvs.FreeBSD.org
ControlPath /home/abbe/.ssh/cvs.cpath

Host ncvs
Hostname ncvs.FreeBSD.org
ControlPath /home/abbe/.ssh/cvs.cpath
#v-

Thanks
-- 
Ashish SHUKLA      | GPG: F682 CDCC 39DC 0FEA E116  20B6 C746 CFA9 E74F A4B0
freebsd.org!ashish | http://people.freebsd.org/~ashish/

“Well, I guess cyborgs like myself have a tendency to be paranoid
about our origins.” (Motoko Kusanagi in movie "Ghost in the Shell")
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: readconf.c.diff
URL: <http://lists.mindrot.org/pipermail/openssh-unix-dev/attachments/20100821/fbe79833/attachment.ksh>


More information about the openssh-unix-dev mailing list