A specified logon session does not exist. It may already have been terminated for non cyg_server users on Cygwin

0

Some more progress:

This is working for any account on which the services is started with. That is if we give credentials of a particular account in Log On tab of a service. Then it works for that account and so on. This is the same case with Windows Remote Management. But everything works fine over RDP.

Some progress

I have installed SSHD service with a user with admin privileges cyg_server. When I login over ssh to this account. Credential manager is working fine. But when I login with other users, it wouldn't.

Original Question

I also observed any programs saving keys to windows credential manager are giving me A specified logon session does not exist. It may already have been terminated. error. (Only when running via ssh)

Although there are some pointers towards the issue on the internet. I was not able to exactly find the root issue.

Edit: Additional Information

The program that I wrote is ultimately calling CredWriteW function from win api.

Could you help?

pinkpanther

Posted 2017-11-20T07:30:02.990

Reputation: 101

Answers

0

do a ssh -vv and see what identity files are used. I bet problems are connected with identity files located in C:\Users\user\.ssh\ and cygwin's home\user\.ssh\. Copy from one to another to make it work.

mnmnc

Posted 2017-11-20T07:30:02.990

Reputation: 3 637

I'm using password based authentication. Are you referring to client? My target machine is Windows, client is Ubuntu. In /home/user/.ssh of Cygwin there are no files. I copied the files from C:\Users.... Let me see what happens. – pinkpanther – 2017-11-20T17:37:49.100

I tried this, it's not working. May be I'm getting the "Specified logon session doesn't exist..." because it's a network authentication via ssh? https://msdn.microsoft.com/en-us/library/windows/desktop/aa375187(v=vs.85).aspx But I'm not sure how to make Cygwin act as a non network user.

– pinkpanther – 2017-11-20T19:12:46.690