Specifying a source IP address or interface for the SFTP client

You can configure a client to use only a specified source IP address or interface to access the SFTP server, enhancing the service manageability.

To specify a source IP address or interface for the SFTP client:

Step

Command

Remarks

1. Enter system view.

system-view

N/A

2. Specify a source IP address or interface for the SFTP client.

  • Specify a source IPv4 address or interface for the SFTP client:sftp client source { ip ip-address | interface interface-type interface-number }

  • Specify a source IPv6 address or interface for the SFTP client:sftp client ipv6 source { ipv6 ipv6-address | interface interface-type interface-number }

Use either command.

By default, an SFTP client uses the IP address of the interface specified by the route of the switch to access the SFTP server.