Solved

SSH - known_hosts file. User defined.

Posted on 2010-11-23
3
1,540 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

We all know how boring and exhausting it is to transfer huge web projects developed locally to a webserver simply via FTP. The File Transfer Protocol is a really nice solution if you need to transfer small amounts of files, but if you're plannin…
Secure Shell (SSH) is a network protocol for secure data communication, mainly used to administer remote Unix / Linux servers via command line. But it also allows the user to open a secure tunnel between a client and a server where he can send any k…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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.

690 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