/.ssh/known_hosts ownership

Smoot Carl-Mitchell smoot at tic.com
Thu May 22 05:03:23 UTC 2008


On Wed, 2008-05-21 at 19:49 -0700, NoOp wrote:
> Following the flurry of ssh updates recently, I notice that my
> /.ssh/known_hosts is set to root.
> 
> Now, in order to get NX and a few other ssh related programs to work
> I've had to reset the ownership to my user & group.
> 
> My question: is resetting /.ssh/known_hosts to user vs root a security
> issue?

No it is not.  It should be owned by your user id.  known_hosts stores
the host keys collected from remote servers.  If the remote key changed,
it may mean the remote server has been compromised or a person in the
middle attack is underway. In most cases the host key has changed
because it has been regenerated on the remote system.  For the truly
paranoid it is a useful check.  Some admins require the know_host key to
match before allowing an SSH connection.  This is handled by the
StrictHostKeyChecking keyword. When set to "yes", it requires you to add
remote host keys manually.
-- 
Smoot Carl-Mitchell
System/Network Architect
smoot at tic.com
+1 480 922 7313
cell: +1 602 421 9005




More information about the ubuntu-users mailing list