1-14
Operation
Command
Description
SFTP server
ls
[
-a
|
-l
] [
remote-path
]
If no file name is provided, all
the files in the current directory
are displayed.
The difference between these
two commands is that the
dir
command can display the file
name, directory as well as file
attributes; while the
Is
command can display only the
file name and directory.
Download a remote file from
the SFTP server
get
remotefile
[
localfile
]
Upload a local file to the remote
SFTP server
put
localfile
[
remotefile
]
Rename a file on the remote
server
rename
remote
-
source
remote-dest
Optional
bye
exit
Exit SFTP client view and
return to system view
quit
The three commands have the
same effect.
Display the online help about a
specified command concerning
SFTP
help
[
all
|
command-name
]
Optional
If you specify to authenticate a client through public key on the server, the client needs to read the local
private key when logging in to the SFTP server. Since both RSA and DSA are available for public key
authentication, you need to use the
identity-key
key word to specify the algorithms to get correct local
private key; otherwise you will fail to log in. For details, see
SSH Operation Manual
.
SFTP Configuration Example
Network requirements
As shown in
Figure 1-6
, establish an SSH connection between the SFTP client (switch A) and the SFTP
server (switch B). Log in to switch B through switch A to manage and transmit files. An SFTP user with
the user name “client001” and password “abc” exists on the SFTP server.
Network diagram
Figure 1-6
Network diagram for SFTP configuration
VLAN-Int1
192.168.0.1/24
SwitchB
SFTP Server
SwitchA
SFTP Client
VLAN-Int1
192.168.0.2/24