Solved

SSH - known_hosts file. User defined.

Posted on 2010-11-23
3
1,524 Views
Last Modified: 2012-06-27
Hello.

command : ssh 192.168.1.10

By default ssh client trying to find record with key for host 192.168.1.10 in file ~/.ssh/known_hosts.
How i can specify another path for file with key?

Something like this:

ssh 192.168.1.10 -known_hosts_path=/etc/known_hosts

Is it possible?
0
Comment
Question by:StolenMan
3 Comments
 
LVL 9

Assisted Solution

by:jeremycrussell
jeremycrussell earned 250 total points
ID: 34197326
Its an option..

You can specify on command line

ssh -o "UserKnownHostsFile=/path/to/new/file" <system name/ip>

of create a file in the users ~/.ssh directory named ssh_config and put the "UserKnownHostsFile=/path/to/new/file" in that file.
0
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 250 total points
ID: 34197365
Hi,

the default for the global known hosts file is /etc/ssh/ssh_known_hosts anyway.

To change that path you can try

ssh -o GlobalKnownHostsFile=/etc/known_hosts 192.168.1.10

wmp

0
 

Author Closing Comment

by:StolenMan
ID: 34197481
Thanks
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Rate limit for DNS queries 7 85
VMware Workstation 12 Player 16 130
VMware Tools Install On Linux Problem 3 83
SSL/TLS - openssl troubleshooting 3 41
I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question