Command Line Reference
System Configuration
File Management
13 min
ftp ftp table 1 ftp config table 1 ftp config command purpose ftp server enable enable ftp server ftp server source {vrf vrf name | interface { mgmt 0 | ethernet interface name | link aggregation lag id | vlan vlan id }} configure the source interface for the ftp server ftp \[ ip | ipv6 ] ip address \[ autologin | vrf vrf name | downloadtip ] login to other devices using ftp protocol ftp server enable ftp server enable \[command] ftp server enable \[purpose] enable ftp server \[view] global configuration view \[notes] ftp server is not enabled by default the current ftp server only allows the 'admin' user to log in, and the corresponding ftp file root directory is /home/admin run command no ftp server enable to disable ftp server \[use cases] sonic# configure terminal sonic(config)# ftp server enable ftp server source {vrf ftp server source {vrf vrf name |interface {mgmt 0|ethernet interface name |link aggregation lag id |vlan vlan id }} \[command] ftp server source{vrf vrf name | interface { mgmt 0 | ethernet interface name | link aggregation lag id | vlan vlan id }} \[purpose] configure the source interface for the ftp server \[parameters] parameter description vrf name vrf name, the default vrf is default interface name interface name (eg 0/1) lag id lag id, the range is \[1,9999] vlan id vlan id, the range is \[1,4094] \[view] global configuration view \[notes] run command no ftp server source to delete the source interface for the ftp server \[use cases] sonic# configure terminal sonic(config)# ftp server source interface ethernet 0/0 ftp \[ip|ipv6] ftp \[ip|ipv6] ip address \[autologin|vrf vrf name |downloadtip] \[command] ftp \[ ip | ipv6 ] ip address \[ autologin | vrf vrf name | downloadtip ] \[purpose] login to other devices using ftp protocol \[parameters] parameter description ip address ip address of devices vrf name vrf name, the default vrf is default \[view] privileged user view \[use cases] sonic# ftp ip 10 250 0 167 autologin connected to 10 250 0 167 220 (vsftpd 3 0 3) name (10 250 0 167\ admin) admin 331 please specify the password password 230 login successful remote system type is unix using binary mode to transfer files ftp> tftp tftp table 2 tftp config table 2 tftp config command purpose tftp server enable enable tftp server tftp server source { vrf vrf name | interface { mgmt 0 | ethernet interface name | link aggregation lag id | vlan vlan id }} configure the source interface for the tftp server tftp \[ ip | ipv6 ] ip address \[ vrf vrf name | port port id ] login to other devices using tftp protocol tftp server enable tftp server enable \[command] tftp server enable \[purpose] enable tftp server \[view] global configuration view \[notes] tftp server is not enabled by default the corresponding tftp file root directory is /srv/tftp/, which belongs to the ‘admin’ user, and only the ‘admin’ user is allowed to add or delete files within it tftp clients cannot add new files to the server or delete files from the server they can download existing files on the server and also upload and update files on the server that have global write permissions run command no tftp server enable to disable tftp server \[use cases] sonic# configure terminal sonic(config)# tftp server enable tftp server source {vrf tftp server source {vrf vrf name |interface {mgmt 0|ethernet interface name |link aggregation lag id |vlan vlan id }} \[command] tftp server source { vrf vrf name | interface { mgmt 0 | ethernet interface name | link aggregation lag id | vlan vlan id }} \[purpose] configure the source interface for the tftp server \[parameters] parameter description vrf name vrf name, the default vrf is default interface name interface name (eg 0/1) lag id lag id, the range is \[1,9999] vlan id vlan id, the range is \[1,4094] \[view] global configuration view \[notes] run command no tftp server source to delete the source interface for the tftp server \[use cases] sonic# configure terminal sonic(config)# tftp server source interface ethernet 0/0 tftp \[ip|ipv6] tftp \[ip|ipv6] ip address \[vrf vrf name |port port id ] \[command] tftp \[ ip | ipv6 ] ip address \[ vrf vrf name | port port id ] \[purpose] login to other devices using tftp protocol \[parameters] parameter description vrf name vrf name, the default vrf is default interface name interface name (eg 0/1) port id port id \[view] privileged user view \[use cases] sonic# tftp ip 10 250 0 167 tftp> scp scp table 3 scp config table 3 scp config command purpose scp \[ ip | ipv6 ] source sourcefile target destinationfile \[ vrf vrf name | src source ip | interface interface name | foldercopy ] transfer files using scp protocol scp \[ip|ipv6] source scp \[ip|ipv6] source sourcefile target destinationfile \[vrf vrf name |src source ip |interface interface name |foldercopy] \[command] scp \[ ip | ipv6 ] source sourcefile target destinationfile \[ vrf vrf name | src source ip | interface interface name | foldercopy ] \[purpose] transfer files using scp protocol \[parameters] parameter description vrf name vrf name, the default vrf is default interface name interface name (eg 0/1) interface name interface name (eg 0/1) source ip source ipaddress foldercopy batch copying files from a folder \[view] privileged user view \[use cases] sonic# scp ip source admin\@10 250 0 167 /home/admin/1 txt target 114 txt admin\@10 250 0 167's password 1 txt 100% 5 1 7kb/s 00 00 sonic#
