On Sat, Nov 02, 2013 at 02:36:01PM -0500, Adam Thompson wrote:
> Reading the ssh_config manpage, I don't see a way to do this...
> 
> I want to match single-part labels, e.g. "servername" without
> matching everything "servername.somewhere.else".
> (I do rely on my local resolver's search functionality.)
> 
> So far, the best I can come up with is "*,!*.*" which doesn't seem to work.
> Is there a way to do this?

The parser is first-match, so you can do something like this:

Host *.*
        Ciphers aes128-ctr,aes192-ctr,aes256-ctr,...

Host *
        Ciphers arcfour256,arcfour128,...

which will use the first for any hostname containing a dot, and the
second for anything without.

Also: it's not in 5.4 but it is in current: check out the Match keyword
for a more flexible method.

-- 
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4  37C9 C982 80C7 8FF4 FA69
    Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.

Reply via email to