The ssh server-source command specifies a source interface for an SSH server.
The undo ssh server-source command cancels the specified source interface for an SSH server.
The ssh server-source physic-isolate command specifies the isolation source interface of the SSH server.
he undo ssh server-source physic-isolate command cancels the isolation source interface of the SSH server.
By default, no source interface is specified for an SSH server.
ssh server-source -i { interface-type interface-number | interface-name }
ssh server-source all-interface
ssh server-source physic-isolate -i { interface-type interface-number | interface-name } -a ip-address
undo ssh server-source -i { interface-type interface-number | interface-name }
undo ssh server-source all-interface
undo ssh server-source physic-isolate -i { interface-type interface-number | interface-name } -a ip-address
Parameter | Description | Value |
---|---|---|
interface-type interface-number |
Specifies the source interface type and interface number of an SSH server. |
- |
all-interface |
Indicates that any interface having an IP address configured can be used as the source interface of an SSH server. |
- |
physic-isolate |
Set interface isolation attribute for SSH Server. |
- |
-i interface-name |
Specifies the source interface name of an SSH server. |
- |
-a ip-address |
Specifies the source IP address. |
The value is in the decimal format. |
Usage Scenario
To improve system security, an SSH server does not accept login requests from any interface by default. To allow authorized users to log in to the SSH server, run this command to specify the source interface of the SSH server.
Prerequisites
If the source interface of the SSH server is a logical interface, the logical interface must have been created. Otherwise, the command cannot be executed successfully.
Configuration Impact
After the source interface of the SSH server is specified, the system allows only SFTP, STelnet, SCP, and SNETCONF users to log in to the server through the specified source interface, and SFTP, STelnet, SCP, and SNETCONF users who log in through other interfaces will be rejected. However, the SFTP, STelnet, SCP, and SNETCONF users who have logged in to the server are not affected.
Precautions
<HUAWEI> system-view [~HUAWEI] interface loopback 0 [~HUAWEI-LoopBack0] ip address 10.1.1.1 24 [*HUAWEI-LoopBack0] quit [*HUAWEI] ssh server-source -i loopback 0 Warning: SSH server source configuration will take effect in the next login. Do you want to continue? [Y/N]:y
<HUAWEI> system-view [~HUAWEI] ssh server-source physic-isolate -i GigabitEthernet 0/1/0 -a 10.1.1.1 Warning: SSH server source configuration will take effect in the next login. Do you want to continue? [Y/N]:y Info: Succeeded in setting the source interface of the SSH server to GigabitEthernet0/1/0.