ssh-user-config ERROR with Cygwin on Windows 7

1

I'm following the How To Get SSH Command-Line Access to Windows 7 Using Cygwin.

At the User Configuration of SSH step (half of the above page, more or less) I got the following error:

$ ssh-user-config
*** ERROR: /home/User is set in the account database as your home directory
*** ERROR: but it is not a valid directory. Cannot create user identity files.

How to proceed?

KcFnMi

Posted 2015-09-30T00:29:30.320

Reputation: 396

1Could you possibly explain what step you're on? What you've tried already? – Insane – 2015-09-30T01:06:17.540

The step is indicated in the question (edited). Please let me know if I can provide more info. Thanks. – KcFnMi – 2015-09-30T08:27:10.237

Answers

0

I found an answer here: https://stackoverflow.com/questions/28573763/i-am-unable-to-find-the-etc-passwd-file-in-cygwin

In short, you have to:

  1. Find the /etc/nsswitch.conf file (open it with notepad or smt like that)
  2. Add this line in: db_home: /%H

That will change your Cygwin home directory to be equal to your Windows user profile directory.

Trung

Posted 2015-09-30T00:29:30.320

Reputation: 16

1

It looks like the /etc/passwd file lists the wrong home directory, or the directory /home/User was deleted.

This might be corrected by opening the passwd file and correcting the home directory for your user, or if it is correct: making the directory in question.

Isaac Hanson

Posted 2015-09-30T00:29:30.320

Reputation: 553

Well. What may I do in this situation? – KcFnMi – 2015-09-30T09:20:38.507

@KcFnMi Fix /etc/passwd or create /home/User – DavidPostill – 2015-09-30T10:04:27.803

/home/User actually exists. How to fix /etc/passwd? – KcFnMi – 2015-09-30T11:16:26.230