
Commenting Script Files
Any line in a script file that begins with the # character is treated as a comment. For example:
# The following line defines the If1 IP address
add IP4Address If1_ip Address=10.6.60.10
Scripts Running Other Scripts
It is possible for one script to run another script. For example, the script my_script.sgs could
contain the line:
script -execute -name my_script2.sgs
cOS Core allows the script file my_script2.sgs to execute another script file and so on. The
maximum depth of this script nesting is 5.
2.1.6. Secure Copy
To upload and download files to or from the Clavister Security Gateway, the secure copy (SCP)
protocol can be used. SCP is based on the SSH protocol and many freely available SCP clients
exist for almost all platforms. The command line examples below are based on the most
common command format for SCP client software.
SCP Command Format
SCP command syntax is straightforward for most console based clients. The basic command
used here is scp followed by the source and destination for the file transfer.
Upload is performed with the command:
> scp <local_filename> <destination_gateway>
Download is done with the command:
> scp <source_gateway> <local_filename>
The source or destination Clavister Security Gateway is of the form:
<user_name>@<gateway_ip_address>:<filepath>.
For
example:
[email protected]:config.bak.
The
<user_name> must
be
a
defined
cOS
Core
user
in the administrator user group.
Note: SCP examples do not show the password prompt
SCP will normally prompt for the user password after the command line but that prompt
is not shown in the examples given here.
The following table summarizes the operations that can be performed between an SCP client
and cOS Core:
File type Upload possible Download possible
Configuration Backup (config.bak) Yes (also with WebUI) Yes (also with WebUI)
Chapter 2: Management and Maintenance
55
Kommentare zu diesen Handbüchern