scp
To secure copy a file from the Cisco NFVIS to an external system or from an external system to Cisco NFVIS, the admin user can use the scp command in privileged EXEC mode.
For detailed information about how to use this command to copy to or from supported locations, see the Usage Guidelines section.
scp source destination
Syntax Description
source |
To copy a file from an external system, specify the source in the following format: user@remotehostip:file . To copy a file to an external system, specify the NFVIS location and name of the file. The external host can have an IPv4 or IPv6 address as described in the Usage Guidelines section. |
destination |
To copy a file to an external system, specify the the destination in the following format: user@remotehostip:file . To copy a file from an external system, specify the NFVIS location and name of the file. The external host can have an IPv4 or IPv6 address as described in the Usage Guidelines section. |
Command Default
None
Command Modes
Privileged EXEC (#)
Command History
Release | Modification |
---|---|
3.7.1 | Support for IPv6 address, NFS location, USB, prefix mappings and log file copy was added. |
3.6.1 |
This command was introduced. |
Usage Guidelines
Following are the guidelines for using the scp command:
-
Supported Users: Only the admin user can run the scp command.
-
Certain special characters are blacklisted from source and destination path, except in certain positions - '*', '&', ';', ':', '@', '|', '..'
-
Supported Locations
-
The admin user can copy files to and from the intdatastore, extdatastore1, extdatastore2, usb, and nfs locations in Cisco NFVIS. In addition, the admin user can copy the log files from Cisco NFVIS to an external system.
Any attempt to SCP to NFVIS file system other than the mentioned list is prohibited by the command:
intdatastore - /data/intdatastore/uploads/
extdatastore1 - /mnt/extdatastore1/uploads/
extdatastore2 - /mnt/extdatastore2/uploads/
usb - /mnt-usb/
nfs - /data/mount/
logs - /data/intdatastore/logs
You can copy to and from extdatastore1, extdatastore2, usb, and nfs locations only if they are available or mounted. The extdatastore1 and extdatastore2 locations are available only in the Cisco ENCS 5400 Series.
-
The admin user can copy the log files from the logs folder of Cisco NFVIS to an external system. Copying files to the logs folder is not allowed. All SCP actions are logged into /data/intdatastore/logs/nfvis_scp.log file.
-
To copy to or from a USB, you must first mount the USB by using the system usb-mount mount ACTIVE command. After the USB is mounted, use the show system file-list disk usb command to find the exact USB name and provide the identified USB name in the scp command; for example, scpuser@remotehostip:fileusb:usb_name/filename .
-
To copy to or from NFS, you must first mount an NFS location by using the system storage nfs_storage command. After the NFS is mounted, you must specify the name of the NFS mount in the scp command; for example, scp user@remotehostip:filenfs: mount_name/filename .
-
-
Supported Address Types: You can specify IPv4 or IPv6 address of an external system. The IPv6 address of the external system must be specified within square brackets ([ ]); for example, scp user@[ remotehostip]:sourcefile destinationfile
Examples
The following example copies the sample.txt file from intdatastore to an external system.
nfvis# scp intdatastore:sample.txt user@203.0.113.2:/Users/user/Desktop/sample.txt
Examples
The following example copies the test.txt file from an external system to intdatastore.
nfvis# scp user@203.0.113.2:/Users/user/Desktop/test.txt intdatastore:test_file.txt
Examples
The following example copies the test.txt file from an external system to USB.
nfvis# scp user@203.0.113.2:/user/Desktop/my_test.txt usb:usb1/test.txt
Examples
The following example copies the sample.txt file to an NFS location.
nfvis# scp user@203.0.113.2:/user/Desktop/sample.txt nfs:nfs_test/sample.txt
Examples
The following example copies the sample.txt file from an external system with IPv6 address.
nfvis# scp user@[2001:DB8:0:ABCD::1]:/user/Desktop/sample.txt intdatastore:sample.txt
Examples
The following example copies the nfvis_scp.log file to an external system.
nfvis# scp logs:nfvis_scp.log user@203.0.113.2:/Users/user/Desktop/copied_nfvis_scp.log