Solved

SSH - known_hosts file. User defined.

Posted on 2010-11-23
3
1,529 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
CENTOS DHCP Server / PXE/TFTP 14 216
Quickest way to query Windows Event ID from a Linux Device 3 74
Samba Question 11 108
LogmeIn using Linux Ubuntu 16.04 6 116
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…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Viewers will learn how to properly install and use Secure Shell (SSH) to work on projects or homework remotely. Download Secure Shell: Follow basic installation instructions: Open Secure Shell and use "Quick Connect" to enter credentials includi…

726 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