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

    Beginners guide to set up SSH?

    Scheduled Pinned Locked Moved General pfSense Questions
    3 Posts 2 Posters 8.1k 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.
    • F
      fribert
      last edited by

      Well, here I am, feeling stupid  ::)

      I would like to set up SSH.
      I've installed putty and puttygen here on my Windoze box.
      I've created a private / public key pair for putty (SSH-2 RSA).
      I've added the private key to putty.
      I've copied the public key from the publickey file I saved from puttygen.
      As far as I remember from way back then, I have to remove the leadin and leadout of the key, and only have they key itself on one line.
      Well anyways, I tried a lot of different formats, so could someone please tell me the setup step by step.

      I tried searching the WIKI, but I didn't find an answer, I also tried searching the forum, and found a lot of irrelevant posts , I didn't find any ssh for dummies post.

      1 Reply Last reply Reply Quote 0
      • F
        flu
        last edited by

        I had got the same problem.
        SSH error message: Server refused our key

        Solution:

        A simple copy from Public-key file generated by puttygen and paste into pfsense GUI (Menu System-Advanced-Secure Shell-Authorizedkeys) generates wrong syntax of authorized_keys file.
        Simple copy looks like:

        –-- BEGIN SSH2 PUBLIC KEY ----
        Comment: "rsa-key-pfsense-admin"
        AAAA.....................................................................
        .....................................................................
        .....................................................................
        .....................................................................=
        ---- END SSH2 PUBLIC KEY ----

        but it has to look like:

        ssh-rsa AAAA...=

        Important! This has to be a single line without newlines!

        1 Reply Last reply Reply Quote 0
        • F
          fribert
          last edited by

          Thankyou very much! Works like a charm  ;D

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