Skip to content
Geek is the Way!
Menu
  • Forums
  • Sobre o blog
  • Contato
  • English
    • Português
Menu

Enabling SSH on your pfSense

Posted on July 5, 2020August 14, 2022 by Thiago Crepaldi

Last Updated on August 14, 2022 by Thiago Crepaldi

For future posts, we will need to have SSH enabled on the pfSense device, so let’s get this out of the way.

Configuring SSH user

I highly recommend not to use admin user for accessing pfSense through SSH. If you do it, you will face several constrains which will probably cost you hours to go through it.

Create a new user instead through System >> User Manager >> Users and click on Add. Make sure Disabled is unchecked, fill in Username and Password fields and at the Group membership box, select admins and click Move to “Member of” list button and click Save to finalize.

You can add your SSH key through the user management page. Paste your SSH public key at Authorized SSH Keys text box and click Save one more time. If you don’t have one SSH key, you can generate one.

Now that you have a viable user, you have to enable SSH on your device. Go to System >> Advanced >> Admin Access. Scroll down and at Secure Shell section, check Enable Secure Shell and select SSH Key Only accordingly, and optionally set SSH port and finish the process by clicking Save.

From another machine, test your connection.

Installing private/public keys for your SSH user

After going through the steps from the previous section, you will be able to SSH into your pfSense. However, we will also need to SSH from your pfSense into other devices for automation.

To accomplish this, you have to either generate a new SSH key or copy your existing into your pfSense. If you generated your keys after login in to your pfSense, you are done. In order to copy your keys to your pfSense, use scp ~/.ssh/id_rsa* <pfsense_username>@<pfsense_ip>:~/.ssh. From now on, not only you can connect into your pfSense without password, but also connecting from your pfSense to other devices without typing passwords too.

Sometimes scp does not preserve file permissions and SSH’ing from pfSense might ask you for password. To fix this, run chmod 644 ~/.ssh/id_rsa.pub and chmod 700 ~/.ssh/id_rsa.

Share this:

  • Tweet

Related

Leave a ReplyCancel reply

LIKED? SUPPORT IT :)

Buy Me a Coffee


Search


Categories

  • Cooking (1)
  • Homelab (79)
    • APC UPS (6)
    • pfSense (40)
    • Proxmox (20)
    • Shopping (1)
    • Supermicro (2)
    • Synology NAS (8)
    • Ubiquiti (6)
    • UDM-Pro (4)
  • Random (3)
  • Wordpress (1)

Tags

Agentless monitoring (3) AP9631 (3) Apache2 (3) APC UPS (6) apt-get software (2) Bind9 (3) certificates (5) CloudFlare (2) DDNS (5) debian (3) DNS (7) DSM (6) Dynamic DNS (4) Firewall (9) gmail (3) Let's Encrypt Certificates (7) monitoring (18) networking (21) PBS (3) pfBlockerNG (2) pfsense (43) port forwarding (3) privacy (2) proxmox (17) proxmox backup server (3) proxmox virtual environment (16) pve (5) rev202207eng (76) security (28) SNMP (4) SNMPv1 (3) ssh (4) SSL (6) Synology (7) udm-pro (5) UDR (2) unifi (6) unifi controller (3) Unifi Dream Router (2) UPS (5) VLAN (4) vpn (9) wifi (4) Zabbix (18) Zabbix Agent2 (11)

See also

Privacy policy

Sitemap

©2025 Geek is the Way! | Design by Superb