Would you like to learn how to enable OPNsense SSH remote access? In this tutorial, we are going to show you all the steps required to enable the SSH service and configure the firewall to allow external connections to the TCP port 22.

• OPNsense 19.7

Equipment list

The following section presents the list of equipment used to create this tutorial.

As an Amazon Associate, I earn from qualifying purchases.

OPNsense – Enable SSH Service

Open a browser software, enter the IP address of your Opnsense firewall and access web interface.

In our example, the following URL was entered in the Browser:

• https://192.168.15.11

The opnsense web interface should be presented.

opnsense login

On the prompt screen, enter the OPNsense Default Password login information.

• Username: root
• Password: Password set during OPNsense the installation

After a successful login, you will be sent to the OPNSense Dashboard.

opnsense dashboard

Access the Opnsense System menu, access the Settings sub-menu and select the Administration option.

opnsense administration menu

Locate the Secure Shell area and perform the following configuration:

• Enable Secure Shell Server – Yes
• Login Group – Wheels, admins
• Root login – Yes, Permit root user login
• Authentication method – Yes, Permit password login
• SSH port – 22
• Listen interfaces – All

opnsense ssh configuration

Click on the Save button to enable the SSH service immediately.

To allow the communication on the WAN interface, you will need to create a firewall rule to allow connections on the TCP port 22 of the OPNsense firewall.

OPNsense – Testing the SSH Configuration

Use the following commands to test the OPNsense SSH communication from a computer running Ubuntu Linux:

Copy to Clipboard

Keep in mind that you need to change the OPNSense IP address to reflect your environment.

You may test the remote connection to the WAN interface and also to the LAN interface.

To test the OPNSense SSH configuration from a computer running Windows:

Download the last version of the PUTTY application, and test the communication using the following parametes:

pfsense ssh putty windows

If you use older versions of the Putty software, you will not be able to connect to the OPNsense firewall.

You have successfully performed an OPNSense SSH communication test.