Ashish SHUKLA
2010-Aug-21 03:01 UTC
[Feature Request] Allow options in Host block to override global options in ssh
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>
Damien Miller
2010-Aug-21 06:42 UTC
[Feature Request] Allow options in Host block to override global options in ssh
On Sat, 21 Aug 2010, Ashish SHUKLA wrote:> 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 isn't necessary, just put the global options in a "Host *" section at the end of the file.