Solved

accessing known_hosts file on MAC OS 10.6

Posted on 2014-03-06
6
2,188 Views
Last Modified: 2014-08-15
Hi, I am fairly new to macs.  I need to edit the known_hosts file and can't find it.  I have tried showing all files by entering this command:  defaults write com.apple.Finder AppleShowAllFiles TRUE
killall finder

I am still not seeing this file anywhere!  Can someone please help!
0
Comment
Question by:kathyb0209
[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
  • 2
6 Comments
 
LVL 40

Accepted Solution

by:
Eoin OSullivan earned 250 total points
ID: 39909594
If you're looking for that file in your .SSH folder you'll not be able to see in the Finder by defaults .. that command you entered DOES NOT reveal system level hidden folders.

Open a Terminal window and enter
cd ~/.ssh

Open in new window

then enter
ls -al

Open in new window


If the known_hosts file exists youll see it there ... you can then open it in the terminal editor as follows
pico known_hosts

Open in new window


Alternatively in the Finder .. in the Go menu select 'Go to Folder'.  Then paste in the path
~/.ssh

Open in new window

It will open the Folder in the Finder
You can see the file if it is in there ... and open with a program like TextWrangler an excellent text editor FREE for OSX .. http://www.barebones.com/products/textwrangler/
0
 
LVL 30

Assisted Solution

by:serialband
serialband earned 250 total points
ID: 39910050
On the POSIX (unix/linux/osx) filesystem, any file preceded with a . (dot) is "hidden"  you can always navigate to them and you can also view them on the terminal command line with -a option. (e.g. ls -a or ls -la.

If you want to open them in the finder, go to the command line and type open ~/.ssh if you're not in your home folder or open .ssh if you are.

If you're removing hosts from the file, then you can just run the following on the command line
ssh-keygen -R HOSTNAME

You can search for a hostname with
ssh-keygen -F HOSTNAME

You normally let ssh prompt you to add host keys, but if you have a file, you can append it to known_hosts.  I frequently  generate a list of known host keys for users to check against or insert into their own known_hosts file.

cat MY_HOST_KEY >> ~/.ssh/known_hosts
cat MY_HOST_KEY_LIST >> ~/.ssh/known_hosts
0
 

Author Comment

by:kathyb0209
ID: 40191860
I've requested that this question be deleted for the following reason:

I figured out the issue on my own. Thank you!
0
 
LVL 40

Expert Comment

by:Eoin OSullivan
ID: 40191861
What did you figure out yourself?  How was it different from the advice supplied?  Please post your solution for the benefit of the experts and others in the future who may have your issue.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

The /etc/authorization file in Mac OS X 10.x can be used to control access to the various panes of the System Preferences amongst other things. It’s used by some of us Mac Sys Admin’s to give Standard Users access to System Prefs panes that only adm…
In this article we will discuss some EI Capitan Mail app issues and provide some manual process to resolve them.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

689 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