Absent Member.. Absent Member..
Absent Member..

Cygwin help needed. Environment variables incorrect after adding ssh keys

We setup ssh keys between our new PPM Linux server and our Windows build server running Cygwin.  Everything connects fine.   However we get permissioned denied if we try to run a script or create a directory etc.   I compared an ssh connection from another PPM server that does not use ssh keys and noticed 'env' variables are different.   The one without ssh keys works fine, and USERDOMAIN and USERNAME match our non human id we use.   The server with ssh keys the USERDOMAIN is the local server name and USERNAME is sshd_server (which doesnt have rights to our home folder).   I've been searching for hours on this dumb issue and cant figure it out.   Its something to do with sshd service and environment variables.  Anyone know how to fix this?   Do we need to add something to the .profile?    

1 Reply
Micro Focus Frequent Contributor
Micro Focus Frequent Contributor


Have you reviewed Cygwin's /etc/passwd and /etc/group files.  I assume that your Domain user, is not associated with an entry in the /etc/passwd file or the /etc/group file needs to be added to.  Potentially, it is assicated with group none (513). 

Test it

ssh -vvv domain/username@hostname


would tell you the groups you associated.

You could update, the passwd and group file by remoting to machine and clicking on cygwin.

mkpasswd -d Domain -u User

would give you the entry for your passwd file.

example  to add the line to passwd file after test:

mkpasswd -d mydomain -u chris   *Just echos it out for verificaiton

mkpasswd -d mydomain -u chris >> /etc/passwd    * appends it to the /etc/passwd file

Sometimes it is best to first create 'Domain Admins' 'Domain Users'

mkgroup -d mydomain -g 'Domain Admins'

mkgroup -d mydomain -g 'Domain Users'

After you test the commands >> /etc/group or copy the line to the file.

Best regards,



The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.