public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Problem with ssh(d)
@ 2021-11-10 14:50 Strasser, Dominik (DI SW ICS ICV)
  2021-11-10 14:56 ` [cygwin] " Jason Pyeron
       [not found] ` <CANV9t=QRzS_ko6S6+G6oW6hRGxMUzCoXJ0825c7YeckfBqS57Q@mail.gmail.com>
  0 siblings, 2 replies; 5+ messages in thread
From: Strasser, Dominik (DI SW ICS ICV) @ 2021-11-10 14:50 UTC (permalink / raw)
  To: cygwin

Hi all,
I am facing the following problem with my sshd installation.

We are in an AD environment. AD holds the needed data for ssh(d) to 
work. I can log into cygwin using ssh. But if I have a key stored 
.ssh/authorized_keys for passwordless login, the groups my user is in 
differs from the one w/o an authorized keys. Unfortunately exactly the 
group(s) for accessing the shared filesystems is missing. We were 
investigating a lot and the only workaround we found is that the sshd 
service runs under the user we want to log in. This unfortunately 
disables any other user to log into the cygwin machine. When debugging 
ssh with -vvv, there is no visible difference between the login with 
authorized_keys or without (of course there is a difference wrt. the 
login method).

This is cygwin 3.2.0 and openssh openssh-8.8p1-1.

Any clues ?

Best regards

Dominik

-- 
Dominik Strasser       | Phone:  +49 89 99013-436
OneSpin Solutions GmbH | Fax:    +49 89 99013-100
Nymphenburgerstr. 20a
80335 Muenchen         | dominik.strasser@onespin.com

OneSpin Solutions GmbH
A Siemens business

Geschaeftsfuehrung: Thomas Heurung, Frank Thurauf
Sitz: Muenchen; Amtsgericht Muenchen HRB 139 464
UstID#: DE 814 413 215


^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [cygwin] Problem with ssh(d)
  2021-11-10 14:50 Problem with ssh(d) Strasser, Dominik (DI SW ICS ICV)
@ 2021-11-10 14:56 ` Jason Pyeron
       [not found] ` <CANV9t=QRzS_ko6S6+G6oW6hRGxMUzCoXJ0825c7YeckfBqS57Q@mail.gmail.com>
  1 sibling, 0 replies; 5+ messages in thread
From: Jason Pyeron @ 2021-11-10 14:56 UTC (permalink / raw)
  To: cygwin

> -----Original Message-----
> From: Strasser, Dominik (DI SW ICS ICV)
> Sent: Wednesday, November 10, 2021 9:50 AM
> 
> Hi all,
> I am facing the following problem with my sshd installation.
> 
> We are in an AD environment. AD holds the needed data for ssh(d) to
> work. I can log into cygwin using ssh. But if I have a key stored
> .ssh/authorized_keys for passwordless login, the groups my user is in
> differs from the one w/o an authorized keys. Unfortunately exactly the
> group(s) for accessing the shared filesystems is missing. We were
> investigating a lot and the only workaround we found is that the sshd
> service runs under the user we want to log in. This unfortunately
> disables any other user to log into the cygwin machine. When debugging
> ssh with -vvv, there is no visible difference between the login with
> authorized_keys or without (of course there is a difference wrt. the
> login method).
> 
> This is cygwin 3.2.0 and openssh openssh-8.8p1-1.
> 
> Any clues ?

Passwordless login and network shares are incompatible by Microsoft design. You can see this in Microsoft task scheduler as well.

Our solution is to not rely on network file sharing, as it is disabled in our environment anyway due to security issues.

v/r,

Jason Pyeron

--
Jason Pyeron  | Architect
PD Inc        | Certified SBA 8(a)
10 w 24th St  | Certified SBA HUBZone
Baltimore, MD | CAGE Code: 1WVR6
 
.mil: jason.j.pyeron.ctr@mail.mil
.com: jpyeron@pdinc.us
tel : 202-741-9397



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Problem with ssh(d)
       [not found] ` <CANV9t=QRzS_ko6S6+G6oW6hRGxMUzCoXJ0825c7YeckfBqS57Q@mail.gmail.com>
@ 2021-11-10 15:28   ` Strasser, Dominik (DI SW ICS ICV)
  2021-11-10 15:44     ` Bill Stewart
  0 siblings, 1 reply; 5+ messages in thread
From: Strasser, Dominik (DI SW ICS ICV) @ 2021-11-10 15:28 UTC (permalink / raw)
  To: Bill Stewart, cygwin

Hi Bill,

On 10.11.2021 16:10, Bill Stewart wrote:
> On Wed, Nov 10, 2021 at 7:52 AM Strasser, Dominik (DI SW ICS ICV) 
> <dominik.strasser@onespin.com> wrote:
>
>     We are in an AD environment. AD holds the needed data for ssh(d) to
>     work. I can log into cygwin using ssh. But if I have a key stored
>     .ssh/authorized_keys for passwordless login, the groups my user is in
>     differs from the one w/o an authorized keys. Unfortunately exactly
>     the
>     group(s) for accessing the shared filesystems is missing. We were
>     investigating a lot and the only workaround we found is that the sshd
>     service runs under the user we want to log in. This unfortunately
>     disables any other user to log into the cygwin machine. When
>     debugging
>     ssh with -vvv, there is no visible difference between the login with
>     authorized_keys or without (of course there is a difference wrt. the
>     login method).
>
>
> The OpenSSH server service should be running as local system, not as a 
> specific user.
I know that this is the standard installation. But we absolutely need 
passwordless login. So this was the workaround we found.
The number of groups differs when sshd is run as local system, and when 
authorized_keys exist or not. Groups are OK, when it is run under the 
one user we absolutely need the passwordless login.

Regards

Dominik
>
> Bill

-- 
Dominik Strasser       | Phone:  +49 89 99013-436
OneSpin Solutions GmbH | Fax:    +49 89 99013-100
Nymphenburgerstr. 20a
80335 Muenchen         |dominik.strasser@onespin.com

OneSpin Solutions GmbH
A Siemens business

Geschaeftsfuehrung: Thomas Heurung, Frank Thurauf
Sitz: Muenchen; Amtsgericht Muenchen HRB 139 464
UstID#: DE 814 413 215

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Problem with ssh(d)
  2021-11-10 15:28   ` Strasser, Dominik (DI SW ICS ICV)
@ 2021-11-10 15:44     ` Bill Stewart
  2021-11-10 18:25       ` [cygwin] " Jason Pyeron
  0 siblings, 1 reply; 5+ messages in thread
From: Bill Stewart @ 2021-11-10 15:44 UTC (permalink / raw)
  To: cygwin

On Wed, Nov 10, 2021 at 8:28 AM Strasser, Dominik (DI SW ICS ICV) wrote:

I know that this is the standard installation. But we absolutely need
> passwordless login. So this was the workaround we found.
> The number of groups differs when sshd is run as local system, and when
> authorized_keys exist or not. Groups are OK, when it is run under the one
> user we absolutely need the passwordless login.
>

Password-less logon is supported when running as local system. I do this
all the time, so there must be something that is not correct about your
configuration.

Sorry, don't know what that might be.

Bill

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [cygwin] Re: Problem with ssh(d)
  2021-11-10 15:44     ` Bill Stewart
@ 2021-11-10 18:25       ` Jason Pyeron
  0 siblings, 0 replies; 5+ messages in thread
From: Jason Pyeron @ 2021-11-10 18:25 UTC (permalink / raw)
  To: cygwin

> -----Original Message-----
> From: Bill Stewart
> Sent: Wednesday, November 10, 2021 10:44 AM
> 
> On Wed, Nov 10, 2021 at 8:28 AM Strasser, Dominik (DI SW ICS ICV) wrote:
> 
> I know that this is the standard installation. But we absolutely need
> > passwordless login. So this was the workaround we found.
> > The number of groups differs when sshd is run as local system, and when
> > authorized_keys exist or not. Groups are OK, when it is run under the one
> > user we absolutely need the passwordless login.
> >
> 
> Password-less logon is supported when running as local system. I do this
> all the time, so there must be something that is not correct about your
> configuration.
> 
> Sorry, don't know what that might be.

I slightly misread the email.

To be clear password less login works - BUT as I said MS design choices result in a different security token being issues without password vs with password.

As such your ability to access certain resources are limited.

Enumerate the groups you have as PKI authentication then bless those groups to perform the action needed.

-Jason

--
Jason Pyeron  | Architect
PD Inc        | Certified SBA 8(a)
10 w 24th St  | Certified SBA HUBZone
Baltimore, MD | CAGE Code: 1WVR6
 
.mil: jason.j.pyeron.ctr@mail.mil
.com: jpyeron@pdinc.us
tel : 202-741-9397



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-11-10 18:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-10 14:50 Problem with ssh(d) Strasser, Dominik (DI SW ICS ICV)
2021-11-10 14:56 ` [cygwin] " Jason Pyeron
     [not found] ` <CANV9t=QRzS_ko6S6+G6oW6hRGxMUzCoXJ0825c7YeckfBqS57Q@mail.gmail.com>
2021-11-10 15:28   ` Strasser, Dominik (DI SW ICS ICV)
2021-11-10 15:44     ` Bill Stewart
2021-11-10 18:25       ` [cygwin] " Jason Pyeron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).