Configuration Guide Vol. 1


11.4.5 Secure FTP

Sftp commands allow you to transfer files through interfaces similar to ftp. Unlike ftp, SSHv2 is used for the communication channel, so the username, password, and file are transmitted in encrypted form and are not leaked to the outside.

The following figure shows an example in which the Switch connects to SSH server and transfers the Switch's configuration file by using sftp command. For example:

Figure 11-22: Example of transferring a file in secure FTP
> sftp staff@2001:db8::1                                                      ..1
Connecting to 2001:db8::1...
staff@2001:db8::1's password:******                                           ..2
sftp> cd /home/staff/                                                         ..3
sftp> mkdir config                                                            ..4
sftp> cd config                                                               ..5
sftp> put config.txt                                                          ..6
Uploading config.txt to /home/staff/config/config.txt
config.txt                                   100% 4062     4.0KB/s   00:00
sftp> quit                                                                    ..7
>
  1. Use sftp command. Connect to SSH server 2001:db8::1 as the user staff.

  2. Enter staff password. (When connecting to SSH server for the second or subsequent time, the host public key confirmation message is not displayed because the host public key is registered in the client user's host public key database.)

  3. Move the directory to /home/staff.

  4. Create a config directory.

  5. Move the directory to /home/staff/config.

  6. Forwards config.txt to the servers.

  7. Disconnect from the server.