< Home

ssh server-source

Function

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.

Format

ssh server-source -i interface-type interface-number

undo ssh server-source

Parameters

Parameter Description Value

-i interface-type interface-number

Specifies the source interface of an SSH server.

-

Views

System view

Default Level

3: Management level

Usage Guidelines

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.

Example

# Specify loopback0 as the source interface of an SSH server.

<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
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >