3Com Switch 8800 Advanced Software V5 Configuration Guide
SFTP Configuration Examples 971
n
If configuring RSA authentication for the SSH user, you need to configure a host
public key for Switch A. For details, refer to related section in
“SSH Server
Configuration Examples” on page 959.
# Enable the SFTP server.
[SwitchB] sftp server enable
# Specify the service type as SFTP for the user.
[SwitchB] ssh user client001 service-type sftp
2 Configure the client (Switch A)
# The IP address of the Vlan interface on Switch A and the IP address of the Vlan
interface on Switch B must be in the same network segment. It is set to
192.168.0.2.
<SwitchA> system-view
[SwitchA] interface vlan-interface 1
[SwitchA-Vlan-interface1] ip address 192.168.0.2 255.255.255.0
[SwitchA-Vlan-interface1] quit
# Establish a connection to the remote SFTP server, and enter SFTP Client view
[SwitchA] sftp 192.168.0.1
Input Username: client001
Trying 192.168.0.1 ...
Press CTRL+K to abort
Connected to 192.168.0.1 ...
The Server is not authenticated. Do you continue access it? [Y/N]:y
Do you want to save the server’s public key? [Y/N]:y
Enter password:
sftp-client>
# Display the current directory of the server, delete the file named "z", and check
whether the file is deleted from the directory successfully.
sftp-client> dir
-rwxrwxrwx 1 noone nogroup 1759 Aug 23 06:52 config.cfg
-rwxrwxrwx 1 noone nogroup 225 Aug 24 08:01 pubkey2
-rwxrwxrwx 1 noone nogroup 283 Aug 24 07:39 pubkey1
drwxrwxrwx 1 noone nogroup 0 Sep 01 06:22 new
-rwxrwxrwx 1 noone nogroup 225 Sep 01 06:55 pub
-rwxrwxrwx 1 noone nogroup 0 Sep 01 08:00 z
sftp-client> delete z
The following File will be deleted:
/z
Are you sure to delete it? [Y/N]:y
This operation may take a long time.Please wait...
File successfully Removed
sftp-client> dir
-rwxrwxrwx 1 noone nogroup 1759 Aug 23 06:52 config.cfg
-rwxrwxrwx 1 noone nogroup 225 Aug 24 08:01 pubkey2
-rwxrwxrwx 1 noone nogroup 283 Aug 24 07:39 pubkey1