copy file <from-file> to <to-file>
file <from-file>
- The source location of the file or folder from which you want to copy. The source location can be on a remote system, but only if
<to-file>
is on a local file system. to <to-file>
- The destination location of the file or folder to which you want to copy. The destination location can be on a remote system, but only only if
<from-file>
is on a local file system. [user <username>]
- Optional. The username to use for the remote system, if a remote system has been specified in
<from-file>
or<to-file>
. Alternatively, you can encode the username in the remote system URL. [password <password>]
- Optional. The password to use for the remote system, if a remote system has been specified in
<from-file>
or<to-file>
. Alternatively, you can encode the password in the remote system URL. [source-interface <interface-name>]
-
Optional. The interface to use for file copy transfers for the remote system, if a remote system has been specified in
<from-file>
or<to-file>
.Note: If you do not specify this argument, Vyatta NOS uses the source interface from theset security ssh-client source-interface
option in the system configuration. [skip-host-validation]
-
Optional. If a remote system has been specified in
<from-file>
or<to-file>
, Vyatta NOS skipsssh-known-hosts
validation for this command.Warning: Using this argument decreases the security of the Vyatta NOS system and exposes the system to potential attacks.
Local file system
To specify a location on a local file system, use the name of the system image, and the directory path to the location.
For example:
- To specify the /config directory of the currently running system, use running://config/
- To specify the /config directory of a system image called
test-image1
, use test-image1://config/
This command is typically used for configuration files and directories — by default, CLI command completion refers to the /config directory of any known system image.
However, you can specify any location that you want, instead of the /config directory.
Remote system
To specify a location on a remote system, use the URL with the required protocol, address, and the directory path to the location.
For example, to specify the /data directory on a remote system with address 192.168.0.10, using the SCP protocol, use scp://192.168.0.10/data/.
set security ssh-known-hosts
.To authenticate with a remote system, you can supply a username and password as command line arguments, or encoded in the remote system URL. If you do not supply a username and password, then Vyatta NOS prompts you for them.
File system locations
A list of file system and remote locations and the corresponding arguments required to specify them.
Vyatta NOS supports the following protocols and formats for specifying a location:
Location | Format |
---|---|
FTP server | ftp://<user>:<password>@<host>/<file> |
SCP server | scp://<user>:<password>@<host>/<file> |
SFTP server | sftp://<user>:<password>@<host>/<file> |
TFTP server | tftp://<host>/<file> |
System image | <image-name>://<file> |
Where the arguments in each location format are specified as follows:
<user>
- Specifies the username on the host.
<password>
- Specifies the password associated with the username.
<host>
- Specifies the host name or IP address of the server.
<file>
- Specifies the path and file name of the target file.
<image-name>
- Specifies the name of a system image.