Specifying the source IP address for outgoing SFTP packets

About specifying the source IP address for outgoing SFTP packets

After you specify the source IP address for outgoing SFTP packets on an SFTP client, the client uses the specified IP address to communicate with the SFTP server.

Restrictions and guidelines

As a best practice, specify the IP address of a loopback interface as the source address of outgoing SFTP packets for the following purposes:

Procedure

  1. Enter system view.

    system-view

  2. Specify the source address for outgoing SFTP packets.

    IPv4:

    sftp client source { ip ip-address | interface interface-type interface-number }

    By default, an SFTP client uses the primary IPv4 address of the output interface in the routing entry as the source address of the outgoing SFTP packets.

    IPv6:

    sftp client ipv6 source { ipv6 ipv6-address | interface interface-type interface-number }

    By default, an IPv6 SFTP client automatically selects a source IPv6 address for the outgoing SFTP packets in compliance with RFC 3484.