Using Keys Rather than Passwords to ssh Into Firewalla Gold

Comments

7 comments

  • Avatar
    Firewalla

    awsome!! 

    0
    Comment actions Permalink
  • Avatar
    Dave Kellermanns

    Great job - do you know if it persistent with the current production firmware?

    0
    Comment actions Permalink
  • Avatar
    Firewalla

    .ssh keys always persist

    0
    Comment actions Permalink
  • Avatar
    FF

    speaking of persistence... so do we have a place to add scripts that will persist after reboot/FW upgrade already and can be run at boot time (or through cron)? 

     

     

    0
    Comment actions Permalink
  • Avatar
    Firewalla

    Anything ~pi/ will persist

    and 1.971 

    4. Customized Scripting and Docker 

    Custom hooks to safely execute user programs and scripts when Firewalla is rebooted. The scripts must be created under: 

    /home/pi/.firewalla/config/post_main.d

    Please see this https://help.firewalla.com/hc/en-us/articles/360051625034 for a pi-hole docker example.

     

    2
    Comment actions Permalink
  • Avatar
    raging_mouse

    For anyone using a password manager that handles SSH keys, eg 1password, you can use that to store the key.

    1. Edit the '~/.ssh/config' file on your client device:

    Host firewalla
        HostName <IP_ADDRESS>
        User pi

    2. Create the key in 1password. Be sure to add the url as shown below, using the hostname from the ssh config file. This serves as a "bookmark" for the key and will use the specified key and avoid the "Too many authentication failures" error if you have too many other keys.

    url
    ssh://firewalla

    3. On the firewalla device, add the public key to '~/.ssh/authorized_keys' file.

    4. SSH to the firewalla device using your preferred 1password authentication method.

    1
    Comment actions Permalink
  • Avatar
    InvaderJim

    Thanks for this great guide.  Works for the Firewalla Purple as well.  One other thing I do is to add my Firewalla box to my ssh config file so I can ssh in just by running 'ssh firewalla'.  The (Linux) commands I use are:

    # Create the key:
    ssh-keygen -t ed25519 -C Firewalla -f ~/.ssh/Firewalla_id_ed25519
    # Update my ssh config file:
    cat << EOF >>~/.ssh/config
    # `date +%Y%m%d`: Now I can SSH to the Firewalla by running 'ssh firewalla'
    Host firewalla
    HostName 192.168.1.1
    IdentityFile ~/.ssh/Firewalla_id_ed25519
    User pi
    Compression yes
    VisualHostKey=yes
    EOF

    1
    Comment actions Permalink

Please sign in to leave a comment.