1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2007
    Rep Power

    Move ssh known_hosts file

    I was wondering if it's possible to move the known_hosts file from ~/.ssh/known_hosts to ~/somewhere/.ssh/known_hosts .

    I have a server running Plesk and the user home directories do not have write permissions (they do have write permissions within the subfolders, however).

    I was able to move the authorized_keys file by editing sshd_config AuthorizedKeysFile , but when I try to log in without password, I'm still prompted every time if I want to add the host to list of known hosts, and it fails to save every time since it cannot write to known_hosts. Thus I am still unable to automate some processes. I'd like known_hosts to be located in the same location as my authorized_keys, which does have correct permissions for users.
  2. #2
  3. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2003
    Minneapolis, MN
    Rep Power
    This is what's listed in man(5) ssh_config:
                 Specifies a file to use for the user host key database instead of
    I think that's what you are looking for. You should be able to just set UserKnownHostsFile to ~/somewhere/.ssh/known_hosts in your global ssh_config on that machine.
    badger badger badger badger
    badger badger badger badger

IMN logo majestic logo threadwatch logo seochat tools logo