Specifying a source IP address/interface for the SSH client

This configuration task allows you to specify a source IP address or interface for the client to access the SSH server, improving service manageability.

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

Step

Command

Remarks

1. Enter system view.

system-view

N/A

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

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

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

Select either approach.

By default, an SSH client uses the IP address of the outbound interface defined by the route to the SSH server to access the SSH server.