336 CHAPTER 19: SSH TERMINAL SERVICES
Network diagram
Figure 103 Network diagram for SFTP
Configuration procedure
1 Configure Switch B as the server.
# Start the SFTP server.
[3Com] sftp-server enable
# Specify the service type as SFTP.
[3Com] ssh user 8040 service-type sftp
2 Configure Switch A as the client.
# Establish a connection with the remote SFTP server and enter the
SFTP client view.
[3Com] sftp 10.111.27.91
# Display the current directory of the server, delete file z, and
check if the directory has been deleted successfully.
sftp-client> dir
-rwxrwxrwx 1 noone nogroup 1759 Aug 23 06:52 vrpcfg.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
Remove this File?(Y/N)
flash:/zy
File successfully Removed
sftp-client> dir
-rwxrwxrwx 1 noone nogroup 1759 Aug 23 06:52 vrpcfg.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
# Create a new directory new1, and check if the new directory has
been created successfully.
sftp-client> mkdir new1
New path created
PC
IP address
SFTP client
Switch B
SFTP server
Switch A
PC
IP address
10.111.27.91
Switch B
Switch A