X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:mime-version:from:date:message-id:subject:to
	:content-type; q=dns; s=default; b=BbWABVOUyUkvZhYQ4pcAx60UmZMS4
	rNbUTCXmePXEFApjIhYEQ7BBPaCVVucV1fxQ4ZymVvZHUvwWqYyCNdmdAJh5jXk6
	11k3/eCoN83a9xr37NLsB2Zbj3LTVdROaE9tvAyq2ZCn7wnAdNacQJd3hOwk0EmO
	fg4RxjHkacAqU4=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:mime-version:from:date:message-id:subject:to
	:content-type; s=default; bh=OSlM470hTeWcPaIOrgT0+pDfXYI=; b=a30
	YjVtPtF1SiSoOZ3ujOetICPv8PP9xV0eJOFnyp+ughZdMD2dhNv3UdqhyVYYWFYS
	L1Tb3VL8TQUxrk6LwfHiRWm44PdpfaHqmq5QO5sf32yvgX79ttn4ghtptlGqe3pW
	h1J2Kx3BMDQmsQ7oHPr5F0VTtmW8hoyzxVJj1WFA=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.1 spammy=risks, H*c:alternative
X-HELO: mout.gmx.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mail.com;	s=dbd5af2cbaf7; t=1554327167;	bh=aIOcX8O2glO4mFrTpoRVnKkfMU3w2njXb9etam0V/lQ=;	h=X-UI-Sender-Class:From:Date:Subject:To;	b=sHXhmJHH9djgxkUgzcvwBYMX2xC39m0p7NUB7zaFYKtbrnjLg9yi+wSYLb6Xips4L	 cSprNjb7wkgXkMFrKWSfNyKRNfBuQaDhlLuuWv1i/RUiUuoOerMwoZDUKwtIxbWX0r	 B9P3xdvZx2MVSkl6MOmg1sPdSU6jDsvLol+19pXQ=
X-UI-Sender-Class: 214d933f-fd2f-45c7-a636-f5d79ae31a79
MIME-Version: 1.0
From: Bill Stewart <bstewart@iname.com>
Date: Wed, 3 Apr 2019 15:32:18 -0600
Message-ID: <CANV9t=Rm5rZv=bS55AKbUoxnmMzd-uexbMAi7hX8QSmCutLafw@mail.gmail.com>
Subject: sshd_config request: hostname token
To: cygwin@cygwin.com
Content-Type: text/plain; charset="UTF-8"
X-IsSubscribed: yes

It seems it would be useful to have a hostname token for use in the
sshd_config file.

Example usage (supposing %H expands to the hostname):

AllowGroups "%H+SSH Users"

This would permit access on the local computer (no matter its name) if the
account is a member of the SSH Users group (if it's a domain member).

This would allow users to change the name of the computer without needing
to edit the sshd_config file (if the computer is a domain member). If the
computer is removed from the domain, you still have to remove the %H+
prefix.

[Aside: This is one of the reasons I find Cygwin's account matching
algorithm to be "backwards," for lack of a better term. IMO local account
names should resolve before domain account names if the computer is a
domain member. If local accounts matched first, all you would need is
AllowGroups "SSH Users" and be done with it. But I realize this is a big
change.]

Are there risks with adding a hostname token that I'm not seeing?

Thanks

Bill

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

