Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

So i have OpenSSH in windows 7 at a university and i am basicly having this problem:

When i first use SSH it is trying to create the known_hosts file on my university network drive H:

enter image description here

But this is not what i want. How can i define a knew location for the known_hosts file and get it to generate there?

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

Set the environment variable HOME to a directory in which you want the .ssh directory to be stored.

share|improve this answer
    
How do i set and check HOME? –  Ben Aug 12 '12 at 22:28
    
and are you sure the environment variable is home because %HOME% is not recognised. –  Ben Aug 12 '12 at 22:55
    
See itechtalk.com/thread3595.html. What do you mean by "%HOME% is not recognized"? –  Fran Aug 13 '12 at 1:48
    
i cant cd to %HOME% it says that it is not a recognised path. –  Ben Aug 13 '12 at 2:08
    
Does echo %HOME% show you the value of the variable? If so, the variable is set. Get that working, and the rest should work too. –  Fran Aug 13 '12 at 13:59
add comment

use variable name as HOME and variable value as %userprofile% to set the home dir in windows.By default your .ssh folder should be there.

To view or change environment variables:
 1.Right-click My Computer, and then click Properties.
 2. Click the Advanced tab.
 3. Click Environment variables.
 4. Click one the following options, for either a user or a system variable:
   o    Click New to add a new variable name and value.
   o    Click an existing variable, and then click Edit to change its name orvalue.
   o    Click an existing variable, and then click Delete to remove it.

Complete article to set up environment variable

share|improve this answer
add comment

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.