ssh server permit interface
Function
The ssh server permit interface command specifies physical interfaces on the SSH server to which clients can connect.
The undo ssh server permit interface command restores the default physical interfaces on the SSH server to which clients can connect.
By default, clients can connect to all the physical interfaces on the SSH server.
Format
ssh server permit interface { interface-type interface-number } &<1-5>
undo ssh server permit interface
Parameters
Parameter | Description | Value |
---|---|---|
interface-type interface-number | interface-type: specifies the interface type. interface-number: specifies the interface number. interface-number and interface-type specify an interface. |
- |
Usage Guidelines
Usage Scenario
To prevent a client from connecting to the SSH server through an unauthorized physical interface or attacking the SSH server by sending a large number of SSH packets, you can run the ssh server permit interface command to specify physical interfaces on the SSH server to which the client can connect.
Precautions
- By default, clients can connect to all the physical interfaces on the SSH server. Once a physical interface is specified using the ssh server permit interface command, a client cannot connect to the SSH server using other physical interfaces (excluding the MEth interface).
- This command can be used only on a Layer 2 physical interface but not on a Layer 3 physical interface, logical interface, or a non-Ethernet interface.
- You can specify a maximum of five interfaces each time you run the ssh server permit interface command. The latest configuration overrides the previous one. For example, before you run the command, clients can connect to three physical interfaces GigabitEthernet 0/0/1, GigabitEthernet 0/0/2, and GigabitEthernet 0/0/3 on the SSH server. After you run the command to specify the interface GigabitEthernet 0/0/1, clients can only connect to the interface GigabitEthernet 0/0/1.
Example
# Specify physical interfaces on the SSH server to which clients can connect.
<AC6605> system-view
[AC6605] ssh server permit interface gigabitethernet 0/0/1 gigabitethernet 0/0/2
Info: Succeeded in setting ssh permit interface.
# Restore the default physical interfaces on the SSH server to which clients can connect.
<AC6605> system-view
[AC6605] undo ssh server permit interface