Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    /etc/ssh /root/.ssh not restored from config.xml after prior sshd enable?

    Scheduled Pinned Locked Moved General pfSense Questions
    2 Posts 2 Posters 1.2k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      hcoin
      last edited by

      Replacing a failed drive I installed a fresh 2.0.3.  In a perhaps, perhaps not key unfortunate move, I enabled sshd to explore a bit before restoring.  Then I did a full restore from an xml file.  Rebooted.  The old /etc/ssh and /root/.ssh remained in effect. None of the ssh keys previously known by other hosts would work, and as the config prevented any username/password combo ssh was effectively dead.    I pulled the old drive out of the trash and was able to grab the /etc/ssh and /root/.ssh directories.  Loading those onto the new drive it all worked once again.

      1 Reply Last reply Reply Quote 0
      • jimpJ
        jimp Rebel Alliance Developer Netgate
        last edited by

        those are not kept in the config.xml file.

        /etc/ssh keys are re-created when the host boots up the first time.

        Root's authorized_keys are written out from config.xml using admin's User Manager account entry. Manual changes to files in that directory are not kept and are not needed.

        Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

        Need help fast? Netgate Global Support!

        Do not Chat/PM for help!

        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.