H3C Technologies H3C SecPath F1000-E User Manual
Page 192
181
# Enable the SFTP server.
[Router] sftp server enable
# Configure an IP address for interface GigabitEthernet 0/1, which the client will use as the
destination for SSH connection.
[Router] interface GigabitEthernet 0/1
[Router-GigabitEthernet0/1] ip address 192.168.0.1 255.255.255.0
[Router-GigabitEthernet0/1] quit
# Set the authentication mode of the user interfaces to AAA.
[Router] user-interface vty 0 4
[Router-ui-vty0-4] authentication-mode scheme
# Enable the user interfaces to support SSH.
[Router-ui-vty0-4] protocol inbound ssh
[Router-ui-vty0-4] quit
# Import the peer public key from the file pubkey.
[Router] public-key peer Router001 import sshkey pubkey
# For user client001, set the service type as SFTP, authentication method as publickey, public key
as Router001, and working folder as flash:/.
[Router] ssh user client001 service-type sftp authentication-type publickey assign
publickey Router001 work-directory flash:/
3.
Establish a connection between the SFTP client and the SFTP server.
# Establish a connection to the remote SFTP server and enter SFTP client view.
Input Username: client001
Trying 192.168.0.1 ...
Press CTRL+K to abort
Connected to 192.168.0.1 ...
The Server is not authenticated. Continue? [Y/N]:y
Do you want to save the server public key? [Y/N]:n
sftp-client>
# Display files under the current directory of the server, delete file z, and check that the file has
been deleted 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 pubkey
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 might take a long time.Please wait...
File successfully Removed
- H3C SecPath F5000-A5 Firewall H3C SecPath F1000-A-EI H3C SecPath F1000-E-SI H3C SecPath F1000-S-AI H3C SecPath F5000-S Firewall H3C SecPath F5000-C Firewall H3C SecPath F100-C-SI H3C SecPath F1000-C-SI H3C SecPath F100-A-SI H3C SecBlade FW Cards H3C SecBlade FW Enhanced Cards H3C SecPath U200-A U200-M U200-S H3C SecPath U200-CA U200-CM U200-CS