Beginners guide to set up SSH?



  • 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.



  • 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!



  • Thankyou very much! Works like a charm  ;D


Locked