scp client-source -i

Function

The scp client-source -i command configures a source interface for the SCP client.

By default, there is no specified source interface for the SCP client.

Format

scp client-source -i { interface-type interface-number | interface-name }

Parameters

Parameter Description Value
interface-type

Specifies the type of a source interface.

-

interface-number

Specifies the number of a source interface.

-

interface-name

Specifies the name of a source interface.

-

Views

System view

Default Level

3: Management level

Task Name and Operations

Task Name Operations
ssh-client write

Usage Guidelines

Usage Scenario

If you run the scp command to log in to the SCP server without specifying a source IP address or source interface, the source IP address or source interface specified using the scp client-source command is adopted by default. When the SCP connection on the server is viewed, the specified source IP address or the primary IP address of the specified source interface is displayed as the IP address of the user.

Precautions

  • If the specified source interface has been bound to a VPN instance, the client is automatically bound to the same VPN instance.
  • If the specified source interface has been bound to a VPN instance, for example, vpn1, but a different VPN instance, for example, vpn2, is specified in the scp client-source -a source-ip-address -vpn-instance vpn-instance-name command, The vpn configured by this command (vpn2) takes effect.
  • After a bound VPN instance is deleted, the VPN configuration specified using the scp client-source command will not be cleared but does not take effect. In this case, the SCP server uses a public IP address. If you configure the VPN instance with the same name again, the VPN function restores.
  • After a bound source interface is deleted, the interface configuration specified using the scp client-source command will not be cleared but does not take effect. If you configure the source interface with the same name again, the interface configuration specified using the scp client-source command is updated and the function restores.

Example

# Set the source interface of the SCP client to LoopBack0.
<HUAWEI> system-view
[~HUAWEI] interface LoopBack 0
[*HUAWEI-LoopBack0] ip address 10.1.1.1 24
[*HUAWEI-LoopBack0] quit
[*HUAWEI] scp client-source -i loopback0
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >