Create a new known_hosts file for openSSH in windows

1

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?

Fantastic Mr Fox

Posted 2012-08-10T02:04:52.560

Reputation: 199

Answers

2

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

Fran

Posted 2012-08-10T02:04:52.560

Reputation: 4 774

How do i set and check HOME? – Fantastic Mr Fox – 2012-08-12T22:28:04.987

and are you sure the environment variable is home because %HOME% is not recognised. – Fantastic Mr Fox – 2012-08-12T22:55:01.540

See http://www.itechtalk.com/thread3595.html. What do you mean by "%HOME% is not recognized"?

– Fran – 2012-08-13T01:48:22.587

i cant cd to %HOME% it says that it is not a recognised path. – Fantastic Mr Fox – 2012-08-13T02:08:38.397

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 – 2012-08-13T13:59:52.650

0

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

Akash Kumar Sharma

Posted 2012-08-10T02:04:52.560

Reputation: 101