630
Examples
# Specify
2:2::2:2
as the source IPv6 address for SFTP packets.
<Sysname> system-view
[Sysname] sftp client ipv6 source ipv6 2:2::2:2
Related commands
display sftp client source
sftp client source
Use
sftp client source
to configure the source IPv4 address for SFTP packets.
Use
undo sftp client source
to restore the default.
Syntax
sftp client source
{
interface
interface-type interface-number
|
ip
ip-address
}
undo sftp client source
Default
The source IPv4 address for SFTP packets is not configured. The SFTP client uses the primary IPv4
address of the output interface in the routing entry as the source IPv4 address of the SFTP packets.
Views
System view
Predefined user roles
network-admin
Parameters
interface interface-type interface-number
: Specifies a source interface by its type and number. The
SFTP packets use the primary IPv4 address of the interface as their source address.
ip
ip-address
: Specifies a source IPv4 address.
Usage guidelines
If you execute this command multiple times, the most recent configuration takes effect.
This command takes effect on all SFTP connections. The source IPv4 address specified in the
sftp
command takes effect only on the current SFTP connection.
If you specify the source IPv4 address both in this command and the
sftp
command, the source IPv4
address specified in the
sftp
command takes effect.
Examples
# Specify
192.168.0.1
as the source IPv4 address for SFTP packets.
<Sysname> system-view
[Sysname] sftp client source ip 192.168.0.1
Related commands
display sftp client source
sftp ipv6
Use
sftp ipv6
to connect an SFTP client to an IPv6 SFTP server and enter SFTP client view.