- Updating the SSH access list from the Configuration utility
- Updating the SSH access list from the command line
You can update the SSH access list from the Configuration utility and the command line.
Important: F5 Networks strongly recommends that you use the Configuration utility rather than the command line to update the SSH access list.
To update the SSH access list using the Configuration utility, perform the following procedure:
- From the Configuration utility, click System.
- Click Platform.
The User Administration page displays.
- From the SSH IP Allow drop-down box, select Specify Range.
- In the SSH IP Allow text box, enter the IP addresses or address ranges for the remote systems allowed to use SSH to communicate with this system.
Important: Separate the IP address entries with a space. If you separate the IP addresses with a comma a non-working entry will be added to the /etc/hosts.allow file, potentially preventing you from reconnecting to the network through SSH.
For example, to restrict access to only systems on the 192.168.0.0 network, and host 10.10.10.1, you would enter the IP addresses in the following format:
- Click Update.
To update the SSH access list from the command line, perform one of the following two procedures, depending on the BIG-IP version you are running:
To update the SSH access list from the command line in BIG-IP version 9.4.2 and later, perform the following procedure:
Note: Starting in BIG-IP version 9.4.2, /etc/hosts.allow is an auto-generated file and should not be manually edited.
- Log in to the command line.
- Use the following command syntax:
bigpipe sshd allow <ip_addr> or <ip_range>
For example, to add the 192.168.1.245 IP address to the existing list of IP addresses that are allowed to log in to the system, type the following command:
bigpipe sshd allow 192.168.1.245 add
To create an initial range of IP addresses (192.168.0.0 with a netmask of 255.255.0.0) that are allowed to log in to the system, type the following command:
bigpipe sshd allow 192.168.0.0/255.255.0.0
- Save the configuration by typing the following command:
To update the SSH access list from the command line in BIG-IP version 9.0 through 9.4.1, perform the following three procedures:
- Restoring overwritten IP addresses
- Updating the /etc/hosts.allow file from the command line
- Editing the Service.SSH.allow configuration database record
In order to display the SSH IP Allow field, the Configuration utility references the Service.SSH.allow record in the configuration database. If an update is performed from the Configuration utility, any manual SSH access additions to the /etc/hosts.allow file will be overwritten by the contents of the configuration database.
Therefore, if a manual update to the SSH access information is required, you must ensure that you update the following two locations:
- /etc/hosts.allow file
- Service.SSH.allow record in the configuration database
To manually update the /etc/hosts.allow file from the command line, perform the following steps:
- Log in to the BIG-IP system command line.
- Change directories to the /etc directory, by typing the following command:
- Using a text editor, such as vi or pico, edit the hosts.allow file.
- Locate the sshd: entry and add the desired address information.
Ensure that you maintain the required 127.2.0.1 internal IP address entry.
For example, to allow access to host 10.10.10.1, and all hosts on the 192.168.0.0/255.255.0.0 network, you would change the line:
sshd : ALL 127.2.0.1
To the following line:
sshd : 192.168. 10.10.10.1 127.2.0.1
- Save the file and exit the editor.
To ensure these new entries are recognized by the Configuration utility you must also add the entries to the Service.SSH.allow record in the configuration database. To set the configuration database Service.SSH.allow record, type the following command from the BIG-IP command line:
Note: You do not need to include the 127.2.0.1 internal IP address that is in the /etc/hosts.allow file.
bigpipe db Service.SSH.allow \"192.168. 10.10.10.1\"
BIG-IP will now allow SSH access from the 192.168.0.0/255.255.0.0 network, host 10.10.10.1.