The ssh server-source command specifies a source interface for an SSH server.
The undo ssh server-source command restores the default setting.
By default, the source interface of an SSH server is not specified.
Parameter | Description | Value |
---|---|---|
-i interface-type interface-number |
Specifies the source interface of an SSH server. |
- |
Usage Scenario
By default, an SSH server receives connection requests from all interfaces, incurring security risks. To enhance system security, you can specify a source interface for an SSH server. Users can log in to the SSH server only from this interface.
Prerequisites
Before you specify a logical interface as the source interface, ensure that the interface to be specified is created and has an IP address configured.
Precautions
After the source interface is specified, a device only allows SSH users to log in to the SSH server through this source interface, and SSH users logging in through other interfaces are denied. Note that setting this parameter only affects SSH users who attempt to log in to the SSH server. It does not affect SSH users who have logged in to the server.
After the source interface of an SSH server is specified using this command, ensure that SSH users can access the source interface at Layer 3. Otherwise, the SSH users will fail to log in to the SSH server.
No source address or source interface is specified, so security risks exist.