Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top
$ ssh

Could not create directory'/cygdrive/c/Documents and Settings/vidar kongsli/.ssh'.
The authenticity of host ' (...)' can't be established.
RSA key fingerprint is ....
Are you sure you want to continue connecting (yes/no)? no
Host key verification failed.

$ set | grep HOME


$ ls ~/.ssh


Any idea why ssh does not use the $HOME environment variable when it tries to locate ~/.ssh?

(edit: fixed formatting)

share|improve this question

migrated from Dec 18 '09 at 17:19

This question came from our site for professional and enthusiast programmers.

Have a look at /etc/passwd. Make sure the entry there matches your expected home directory. It's the second to last field for your user's entry.

share|improve this answer

Is the variable HOME exported? Try: export HOME then ssh again.

share|improve this answer

Editing value of db_home in /etc/nsswitch.conf worked for me

share|improve this answer
Editing how? What did you set db_home to? – Andrew Schulman Jul 23 '15 at 10:53
@AndrewSchulman To the directory I want as my home directory? – VarunAgw Jul 23 '15 at 10:58

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.