Fortinet white logo
Fortinet white logo

EMS CLI Reference

7.4.5

execute scp

execute scp

copies files to/from a remote host using the SCP service

Synopsis

execute scp attempts to copy files to or from a remote host using the SCP service.

If copying from a remote host to the local machine, include the --read flag; if copying from the local machine to a remote host, do not include the flag.

Also include:

  • the local filepath (or local destination for a remote file) to the --local.file flag;
  • the remote filepath (or remote destination for a local file) to the --remote.file flag, and
  • any other --remote flags required to connect.

Furthermore:

  • If writing to a remote host, the --local.file must be located in one of /exchange, /opt/forticlientems, or /var/log/forticlientems (or subfolders of these folders)
  • If reading from a remote host, --local.file must be located in either /exchange or /opt/forticlientems (or subfolders of these folders)
execute scp [flags]

Options

  -h, --help                     help for scp
      --local.file string        The /path/filename of the file to be copied (or destination of the file to be saved) on the local host
      --read                     Specifies that this command is to read a file from the remote host (rather than copy from)
      --remote.file string       The /path/filename of the file to be copied (or destination of the file to be saved) on the remote host
      --remote.ip string         The IP of the remote host where the file will be copied to/from
      --remote.password string   The password for the remote user that will be used to connect to the remote host
      --remote.port int          The port to be used by the remote read service. [default: 22]
      --remote.user string       The user that will be used to connect to the remote host

See also

  • execute - for executing commands on the host
  • execute ftp - copies files to/from a remote host using the FTP service
  • execute sftp - copies files to/from a remote host using the SFTP service

execute scp

execute scp

copies files to/from a remote host using the SCP service

Synopsis

execute scp attempts to copy files to or from a remote host using the SCP service.

If copying from a remote host to the local machine, include the --read flag; if copying from the local machine to a remote host, do not include the flag.

Also include:

  • the local filepath (or local destination for a remote file) to the --local.file flag;
  • the remote filepath (or remote destination for a local file) to the --remote.file flag, and
  • any other --remote flags required to connect.

Furthermore:

  • If writing to a remote host, the --local.file must be located in one of /exchange, /opt/forticlientems, or /var/log/forticlientems (or subfolders of these folders)
  • If reading from a remote host, --local.file must be located in either /exchange or /opt/forticlientems (or subfolders of these folders)
execute scp [flags]

Options

  -h, --help                     help for scp
      --local.file string        The /path/filename of the file to be copied (or destination of the file to be saved) on the local host
      --read                     Specifies that this command is to read a file from the remote host (rather than copy from)
      --remote.file string       The /path/filename of the file to be copied (or destination of the file to be saved) on the remote host
      --remote.ip string         The IP of the remote host where the file will be copied to/from
      --remote.password string   The password for the remote user that will be used to connect to the remote host
      --remote.port int          The port to be used by the remote read service. [default: 22]
      --remote.user string       The user that will be used to connect to the remote host

See also

  • execute - for executing commands on the host
  • execute ftp - copies files to/from a remote host using the FTP service
  • execute sftp - copies files to/from a remote host using the SFTP service