With nsswitch db_home of /cygdrive/c/%U ssh can't seem to use .ssh folder

Byron anondaymia@gmail.com
Fri Dec 18 16:46:00 GMT 2015

On Fri, 18 Dec 2015 17:12:55 +0100
Corinna Vinschen wrote:

> On Dec 18 10:02, Byron wrote:
> > Every time I use ssh to a machine I get the fingerprint warnings
> > like it's the first time I've ssh-ed to that machine. I've narrowed
> > it down to have something to do with my `db_home` being set to
> > `/cygdrive/c/%U` in `nsswitch.conf`. I have it set to this value
> > because I want my Cygwin home folder to be the home folder of my
> > computer. Since I'm on an Active Directory network if I set
> > `db_home` to `windows` then my home folder is on a network file
> > server rather than my desktop.
> > 
> Also, usually your Windows home folder is not /cygdrive/c/$USERNAME
> but /cygdrive/c/Users/$USERNAME.  Are you sure that's not the problem
> here?

That was indeed the problem! I missed the `Users/` part of the path
when I defined `db_home`.

> > Permissions of my `/cygdrive/c/bkboulton/.ssh` folder ar
> > `drwx------+`.
> The '+' is suspicious.  What does icacls print for .ssh?

I have no idea what any of this means, but here you go.

$ icacls .ssh
.ssh XXX\myusername:(F)
     XXX\Domain Users:(Rc,S,RA)

Successfully processed 1 files; Failed processing 0 files

> > Permissions on all file in that folder are `-rw-r--r--`.
> All files?  Even the private keys?  The permissions for private
> keys should be 0600.

That's weird, I wonder how the private key permissions got to be 0644?

Thanks for spotting my problem with the `db_home` setting.

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

More information about the Cygwin mailing list