sftp-server

package: openssh-server

title: sftp-server(8)

summary: OpenSSH SFTP server subsystem

text:
# sftp-server(8)

## NAME
sftp-server — OpenSSH SFTP server subsystem

## SYNOPSIS
sftp-server

[-ehR] [-d start_directory] [-f log_facility] [-l log_level] [-P denied_requests] [-p allowed_requests] [-u umask]

sftp-server

-Q protocol_feature

## DESCRIPTION
sftp-server is a program that speaks the server side of SFTP protocol to stdout and expects client requests from stdin. sftp-server is not intended to be called directly, but from sshd(8) using the Subsystem option.

Command-line flags to sftp-server should be specified in the Subsystem declaration. See sshd_config(5) for more information.

Valid options are:

-d start_directory

Specifies an alternate starting directory for users. The pathname may contain the following tokens that are expanded at runtime: %% is replaced by a literal '%', %d is replaced by the home directory of the user being authenticated, and %u is replaced by the username of that user. The default is to use the user's home directory. This option is useful in conjunction with the sshd_config(5) ChrootDirectory option.

-e

Causes sftp-server to print logging information to stderr instead of syslog for debugging.

-f log_facility

Specifies the facility code that is used when logging messages from sftp-server. The possible values are: DAEMON, USER, AUTH, AUTHPRIV, LOCAL0, LOCAL1, LOCAL2, LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7. The default is AUTHPRIV.

-h

Displays sftp-server usage information.

-l log_level

Specifies which messages will be logged by sftp-server. The possible values are: QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3. INFO and VERBOSE log transactions that sftp-server performs on behalf of the client. DEBUG and DEBUG1 are equivalent. DEBUG2 and DEBUG3 each specify higher levels of debugging output. The default is ERROR.

-P denied_requests

Specifies a comma-separated list of SFTP protocol requests that are banned by the server. sftp-server will reply to any denied request with a failure. The -Q flag can be used to determine the supported request types. If both denied and allowed lists are specified, then the denied list is applied before the allowed list.

-p allowed_requests

Specifies a comma-separated list of SFTP protocol requests that are permitted by the server. All request types that are not on the allowed list will be logged and replied to with a failure message. Care must be taken when using this feature to ensure that requests made implicitly by SFTP clients are permitted.

-Q protocol_feature

Queries protocol features supported by sftp-server. At present the only feature that may be queried is “requests”, which may be used to deny or allow specific requests (flags -P and -p respectively).

-R

Places this instance of sftp-server into a read-only mode. Attempts to open files for writing, as well as other operations that change the state of the filesystem, will be denied.

-u umask

Sets an explicit umask(2) to be applied to newly-created files and directories, instead of the user's default mask.

On some systems, sftp-server must be able to access /dev/log for logging to work, and use of sftp-server in a chroot configuration therefore requires that syslogd(8) establish a logging socket inside the chroot directory.

## SEE ALSO
sftp(1), ssh(1), sshd_config(5), sshd(8)

T. Ylonen and S. Lehtinen, SSH File Transfer Protocol, draft-ietf-secsh-filexfer-02.txt, October 2001, work in progress material.

## HISTORY
sftp-server first appeared in OpenBSD 2.8.

## AUTHORS
Markus Friedl <markus@openbsd.org>


sshd

title: sshd(8)

summary: OpenSSH daemon

text:
# sshd(8)

## NAME
sshd — OpenSSH daemon

## SYNOPSIS
sshd

[-46DdeGiqTtV] [-C connection_spec] [-c host_certificate_file] [-E log_file] [-f config_file] [-g login_grace_time] [-h host_key_file] [-o option] [-p port] [-u len]

## DESCRIPTION
sshd (OpenSSH Daemon) is the daemon program for ssh(1). It provides secure encrypted communications between two untrusted hosts over an insecure network.

sshd listens for connections from clients. It is normally started at boot from /etc/rc. It forks a new daemon for each incoming connection. The forked daemons handle key exchange, encryption, authentication, command execution, and data exchange.

sshd can be configured using command-line options or a configuration file (by default sshd_config(5)); command-line options override values specified in the configuration file. sshd rereads its configuration file when it receives a hangup signal, SIGHUP, by executing itself with the name and options it was started with, e.g. /usr/sbin/sshd.

The options are as follows:

-4

Forces sshd to use IPv4 addresses only.

-6

Forces sshd to use IPv6 addresses only.

-C connection_spec

Specify the connection parameters to use for the -T extended test mode. If provided, any Match directives in the configuration file that would apply are applied before the configuration is written to standard output. The connection parameters are supplied as keyword=value pairs and may be supplied in any order, either with multiple -C options or as a comma-separated list. The keywords are “addr”, “user”, “host”, “laddr”, “lport”, and “rdomain” and correspond to source address, user, resolved source host name, local address, local port number and routing domain respectively.

-c host_certificate_file

Specifies a path to a certificate file to identify sshd during key exchange. The certificate file must match a host key file specified using the -h option or the HostKey configuration directive.

-D

When this option is specified, sshd will not detach and does not become a daemon. This allows easy monitoring of sshd.

-d

Debug mode. The server sends verbose debug output to standard error, and does not put itself in the background. The server also will not fork(2) and will only process one connection. This option is only intended for debugging for the server. Multiple -d options increase the debugging level. Maximum is 3.

-E log_file

Append debug logs to log_file instead of the system log.

-e

Write debug logs to standard error instead of the system log.

-f config_file

Specifies the name of the configuration file. The default is /etc/openssh/sshd_config. sshd refuses to start if there is no configuration file.

-G

Parse and print configuration file. Check the validity of the configuration file, output the effective configuration to stdout and then exit. Optionally, Match rules may be applied by specifying the connection parameters using one or more -C options.

-g login_grace_time

Gives the grace time for clients to authenticate themselves (default 120 seconds). If the client fails to authenticate the user within this many seconds, the server disconnects and exits. A value of zero indicates no limit.

-h host_key_file

Specifies a file from which a host key is read. This option must be given if sshd is not run as root (as the normal host key files are normally not readable by anyone but root). The default is /etc/openssh/ssh_host_ecdsa_key, /etc/openssh/ssh_host_ed25519_key and /etc/openssh/ssh_host_rsa_key. It is possible to have multiple host key files for the different host key algorithms.

-i

Specifies that sshd is being run from inetd(8).

-o option

Can be used to give options in the format used in the configuration file. This is useful for specifying options for which there is no separate command-line flag. For full details of the options, and their values, see sshd_config(5).

-p port

Specifies the port on which the server listens for connections (default 22). Multiple port options are permitted. Ports specified in the configuration file with the Port option are ignored when a command-line port is specified. Ports specified using the ListenAddress option override command-line ports.

-q

Quiet mode. Nothing is sent to the system log. Normally the beginning, authentication, and termination of each connection is logged.

-T

Extended test mode. Check the validity of the configuration file, output the effective configuration to stdout and then exit. Optionally, Match rules may be applied by specifying the connection parameters using one or more -C options. This is similar to the -G flag, but it includes the additional testing performed by the -t flag.

-t

Test mode. Only check the validity of the configuration file and sanity of the keys. This is useful for updating sshd reliably as configuration options may change.

-u len

This option is used to specify the size of the field in the utmp structure that holds the remote host name. If the resolved host name is longer than len, the dotted decimal value will be used instead. This allows hosts with very long host names that overflow this field to still be uniquely identified. Specifying -u0 indicates that only dotted decimal addresses should be put into the utmp file. -u0 may also be used to prevent sshd from making DNS requests unless the authentication mechanism or configuration requires it. Authentication mechanisms that may require DNS include HostbasedAuthentication and using a from="pattern-list" option in a key file. Configuration options that require DNS include using a USER@HOST pattern in AllowUsers or DenyUsers.

-V

Display the version number and exit.

## AUTHENTICATION
The OpenSSH SSH daemon supports SSH protocol 2 only. Each host has a host-specific key, used to identify the host. Whenever a client connects, the daemon responds with its public host key. The client compares the host key against its own database to verify that it has not changed. Forward secrecy is provided through a Diffie-Hellman key agreement. This key agreement results in a shared session key. The rest of the session is encrypted using a symmetric cipher. The client selects the encryption algorithm to use from those offered by the server. Additionally, session integrity is provided through a cryptographic message authentication code (MAC).

Finally, the server and the client enter an authentication dialog. The client tries to authenticate itself using host-based authentication, public key authentication, challenge-response authentication, or password authentication.

Regardless of the authentication type, the account is checked to ensure that it is accessible. An account is not accessible if it is locked, listed in DenyUsers or its group is listed in DenyGroups . The definition of a locked account is system dependent. Some platforms have their own account database (eg AIX) and some modify the passwd field ( ‘*LK*’ on Solaris and UnixWare, ‘*’ on HP-UX, containing ‘Nologin’ on Tru64, a leading ‘*LOCKED*’ on FreeBSD and a leading ‘!’ on most Linuxes). If there is a requirement to disable password authentication for the account while allowing still public-key, then the passwd field should be set to something other than these values (eg ‘NP’ or ‘*NP*’ ).

If the client successfully authenticates itself, a dialog for preparing the session is entered. At this time the client may request things like allocating a pseudo-tty, forwarding X11 connections, forwarding TCP connections, or forwarding the authentication agent connection over the secure channel.

After this, the client either requests an interactive shell or execution of a non-interactive command, which sshd will execute via the user's shell using its -c option. The sides then enter session mode. In this mode, either side may send data at any time, and such data is forwarded to/from the shell or command on the server side, and the user terminal in the client side.

When the user program terminates and all forwarded X11 and other connections have been closed, the server sends command exit status to the client, and both sides exit.

## LOGIN PROCESS
When a user successfully logs in, sshd does the following:

- If the login is on a tty, and no command has been specified, prints last login time and /etc/motd (unless prevented in the configuration file or by ~/.hushlogin; see the FILES section).

- If the login is on a tty, records login time.

- Checks /etc/nologin; if it exists, prints contents and quits (unless root).

- Changes to run with normal user privileges.

- Sets up basic environment.

- Reads the file ~/.ssh/environment, if it exists, and users are allowed to change their environment. See the PermitUserEnvironment option in sshd_config(5).

- Changes to user's home directory.

- If ~/.ssh/rc exists and the sshd_config(5) PermitUserRC option is set, runs it; else if /etc/openssh/sshrc exists, runs it; otherwise runs xauth(1). The “rc” files are given the X11 authentication protocol and cookie in standard input. See SSHRC, below.

- Runs user's shell or command. All commands are run under the user's login shell as specified in the system password database.

## SSHRC
If the file ~/.ssh/rc exists, sh(1) runs it after reading the environment files but before starting the user's shell or command. It must not produce any output on stdout; stderr must be used instead. If X11 forwarding is in use, it will receive the "proto cookie" pair in its standard input (and DISPLAY in its environment). The script must call xauth(1) because sshd will not run xauth automatically to add X11 cookies.

The primary purpose of this file is to run any initialization routines which may be needed before the user's home directory becomes accessible; AFS is a particular example of such an environment.

This file will probably contain some initialization code followed by something similar to:

```
if read proto cookie && [ -n "$DISPLAY" ]; then
	if [ `echo $DISPLAY | cut -c1-10` = 'localhost:' ]; then
		# X11UseLocalhost=yes
		echo add unix:`echo $DISPLAY |
		    cut -c11-` $proto $cookie
	else
		# X11UseLocalhost=no
		echo add $DISPLAY $proto $cookie
	fi | xauth -q -
fi
```

If this file does not exist, /etc/openssh/sshrc is run, and if that does not exist either, xauth is used to add the cookie.

## AUTHORIZED_KEYS FILE FORMAT
AuthorizedKeysFile specifies the files containing public keys for public key authentication; if this option is not specified, the default is ~/.ssh/authorized_keys and ~/.ssh/authorized_keys2. Each line of the file contains one key (empty lines and lines starting with a ‘#’ are ignored as comments). Public keys consist of the following space-separated fields: options, keytype, base64-encoded key, comment. The options field is optional. The supported key types are:

- sk-ecdsa-sha2-nistp256@openssh.com

- ecdsa-sha2-nistp256

- ecdsa-sha2-nistp384

- ecdsa-sha2-nistp521

- sk-ssh-ed25519@openssh.com

- ssh-ed25519

- ssh-dss

- ssh-rsa

The comment field is not used for anything (but may be convenient for the user to identify the key).

Note that lines in this file can be several hundred bytes long (because of the size of the public key encoding) up to a limit of 8 kilobytes, which permits RSA keys up to 16 kilobits. You don't want to type them in; instead, copy the id_dsa.pub, id_ecdsa.pub, id_ecdsa_sk.pub, id_ed25519.pub, id_ed25519_sk.pub, or the id_rsa.pub file and edit it.

sshd enforces a minimum RSA key modulus size of 1024 bits.

The options (if present) consist of comma-separated option specifications. No spaces are permitted, except within double quotes. The following option specifications are supported (note that option keywords are case-insensitive):

agent-forwarding

Enable authentication agent forwarding previously disabled by the restrict option.

cert-authority

Specifies that the listed key is a certification authority (CA) that is trusted to validate signed certificates for user authentication. Certificates may encode access restrictions similar to these key options. If both certificate restrictions and key options are present, the most restrictive union of the two is applied.

command="command"

Specifies that the command is executed whenever this key is used for authentication. The command supplied by the user (if any) is ignored. The command is run on a pty if the client requests a pty; otherwise it is run without a tty. If an 8-bit clean channel is required, one must not request a pty or should specify no-pty. A quote may be included in the command by quoting it with a backslash. This option might be useful to restrict certain public keys to perform just a specific operation. An example might be a key that permits remote backups but nothing else. Note that the client may specify TCP and/or X11 forwarding unless they are explicitly prohibited, e.g. using the restrict key option.

The command originally supplied by the client is available in the SSH_ORIGINAL_COMMAND environment variable. Note that this option applies to shell, command or subsystem execution. Also note that this command may be superseded by a sshd_config(5) ForceCommand directive.

If a command is specified and a forced-command is embedded in a certificate used for authentication, then the certificate will be accepted only if the two commands are identical.

environment="NAME=value"

Specifies that the string is to be added to the environment when logging in using this key. Environment variables set this way override other default environment values. Multiple options of this type are permitted. Environment processing is disabled by default and is controlled via the PermitUserEnvironment option.

expiry-time="timespec"

Specifies a time after which the key will not be accepted. The time may be specified as a YYYYMMDD[Z] date or a YYYYMMDDHHMM[SS][Z] time. Dates and times will be interpreted in the system time zone unless suffixed by a Z character, in which case they will be interpreted in the UTC time zone.

from="pattern-list"

Specifies that in addition to public key authentication, either the canonical name of the remote host or its IP address must be present in the comma-separated list of patterns. See PATTERNS in ssh_config(5) for more information on patterns. In addition to the wildcard matching that may be applied to hostnames or addresses, a from stanza may match IP addresses using CIDR address/masklen notation.

The purpose of this option is to optionally increase security: public key authentication by itself does not trust the network or name servers or anything (but the key); however, if somebody somehow steals the key, the key permits an intruder to log in from anywhere in the world. This additional option makes using a stolen key more difficult (name servers and/or routers would have to be compromised in addition to just the key).

no-agent-forwarding

Forbids authentication agent forwarding when this key is used for authentication.

no-port-forwarding

Forbids TCP forwarding when this key is used for authentication. Any port forward requests by the client will return an error. This might be used, e.g. in connection with the command option.

no-pty

Prevents tty allocation (a request to allocate a pty will fail).

no-user-rc

Disables execution of ~/.ssh/rc.

no-X11-forwarding

Forbids X11 forwarding when this key is used for authentication. Any X11 forward requests by the client will return an error.

permitlisten="[host:]port"

Limit remote port forwarding with the ssh(1) -R option such that it may only listen on the specified host (optional) and port. IPv6 addresses can be specified by enclosing the address in square brackets. Multiple permitlisten options may be applied separated by commas. Hostnames may include wildcards as described in the PATTERNS section in ssh_config(5). A port specification of * matches any port. Note that the setting of GatewayPorts may further restrict listen addresses. Note that ssh(1) will send a hostname of “localhost” if a listen host was not specified when the forwarding was requested, and that this name is treated differently to the explicit localhost addresses “127.0.0.1” and “::1”.

permitopen="host:port"

Limit local port forwarding with the ssh(1) -L option such that it may only connect to the specified host and port. IPv6 addresses can be specified by enclosing the address in square brackets. Multiple permitopen options may be applied separated by commas. No pattern matching or name lookup is performed on the specified hostnames, they must be literal host names and/or addresses. A port specification of * matches any port.

port-forwarding

Enable port forwarding previously disabled by the restrict option.

principals="principals"

On a cert-authority line, specifies allowed principals for certificate authentication as a comma-separated list. At least one name from the list must appear in the certificate's list of principals for the certificate to be accepted. This option is ignored for keys that are not marked as trusted certificate signers using the cert-authority option.

pty

Permits tty allocation previously disabled by the restrict option.

no-touch-required

Do not require demonstration of user presence for signatures made using this key. This option only makes sense for the FIDO authenticator algorithms ecdsa-sk and ed25519-sk.

verify-required

Require that signatures made using this key attest that they verified the user, e.g. via a PIN. This option only makes sense for the FIDO authenticator algorithms ecdsa-sk and ed25519-sk.

restrict

Enable all restrictions, i.e. disable port, agent and X11 forwarding, as well as disabling PTY allocation and execution of ~/.ssh/rc. If any future restriction capabilities are added to authorized_keys files, they will be included in this set.

tunnel="n"

Force a tun(4) device on the server. Without this option, the next available device will be used if the client requests a tunnel.

user-rc

Enables execution of ~/.ssh/rc previously disabled by the restrict option.

X11-forwarding

Permits X11 forwarding previously disabled by the restrict option.

An example authorized_keys file:

```
# Comments are allowed at start of line. Blank lines are allowed.
# Plain key, no restrictions
ssh-rsa ...
# Forced command, disable PTY and all forwarding
restrict,command="dump /home" ssh-rsa ...
# Restriction of ssh -L forwarding destinations
permitopen="192.0.2.1:80",permitopen="192.0.2.2:25" ssh-rsa ...
# Restriction of ssh -R forwarding listeners
permitlisten="localhost:8080",permitlisten="[::1]:22000" ssh-rsa ...
# Configuration for tunnel forwarding
tunnel="0",command="sh /etc/netstart tun0" ssh-rsa ...
# Override of restriction to allow PTY allocation
restrict,pty,command="nethack" ssh-rsa ...
# Allow FIDO key without requiring touch
no-touch-required sk-ecdsa-sha2-nistp256@openssh.com ...
# Require user-verification (e.g. PIN or biometric) for FIDO key
verify-required sk-ecdsa-sha2-nistp256@openssh.com ...
# Trust CA key, allow touch-less FIDO if requested in certificate
cert-authority,no-touch-required,principals="user_a" ssh-rsa ...
```

## SSH_KNOWN_HOSTS FILE FORMAT
The /etc/openssh/ssh_known_hosts and ~/.ssh/known_hosts files contain host public keys for all known hosts. The global file should be prepared by the administrator (optional), and the per-user file is maintained automatically: whenever the user connects to an unknown host, its key is added to the per-user file.

Each line in these files contains the following fields: marker (optional), hostnames, keytype, base64-encoded key, comment. The fields are separated by spaces.

The marker is optional, but if it is present then it must be one of “@cert-authority”, to indicate that the line contains a certification authority (CA) key, or “@revoked”, to indicate that the key contained on the line is revoked and must not ever be accepted. Only one marker should be used on a key line.

Hostnames is a comma-separated list of patterns (‘*’ and ‘?’ act as wildcards); each pattern in turn is matched against the host name. When sshd is authenticating a client, such as when using HostbasedAuthentication, this will be the canonical client host name. When ssh(1) is authenticating a server, this will be the host name given by the user, the value of the ssh(1) HostkeyAlias if it was specified, or the canonical server hostname if the ssh(1) CanonicalizeHostname option was used.

A pattern may also be preceded by ‘!’ to indicate negation: if the host name matches a negated pattern, it is not accepted (by that line) even if it matched another pattern on the line. A hostname or address may optionally be enclosed within ‘[’ and ‘]’ brackets then followed by ‘:’ and a non-standard port number.

Alternately, hostnames may be stored in a hashed form which hides host names and addresses should the file's contents be disclosed. Hashed hostnames start with a ‘|’ character. Only one hashed hostname may appear on a single line and none of the above negation or wildcard operators may be applied.

The keytype and base64-encoded key are taken directly from the host key; they can be obtained, for example, from /etc/openssh/ssh_host_rsa_key.pub. The optional comment field continues to the end of the line, and is not used.

Lines starting with ‘#’ and empty lines are ignored as comments.

When performing host authentication, authentication is accepted if any matching line has the proper key; either one that matches exactly or, if the server has presented a certificate for authentication, the key of the certification authority that signed the certificate. For a key to be trusted as a certification authority, it must use the “@cert-authority” marker described above.

The known hosts file also provides a facility to mark keys as revoked, for example when it is known that the associated private key has been stolen. Revoked keys are specified by including the “@revoked” marker at the beginning of the key line, and are never accepted for authentication or as certification authorities, but instead will produce a warning from ssh(1) when they are encountered.

It is permissible (but not recommended) to have several lines or different host keys for the same names. This will inevitably happen when short forms of host names from different domains are put in the file. It is possible that the files contain conflicting information; authentication is accepted if valid information can be found from either file.

Note that the lines in these files are typically hundreds of characters long, and you definitely don't want to type in the host keys by hand. Rather, generate them by a script, ssh-keyscan(1) or by taking, for example, /etc/openssh/ssh_host_rsa_key.pub and adding the host names at the front. ssh-keygen(1) also offers some basic automated editing for ~/.ssh/known_hosts including removing hosts matching a host name and converting all host names to their hashed representations.

An example ssh_known_hosts file:

```
# Comments allowed at start of line
cvs.example.net,192.0.2.10 ssh-rsa AAAA1234.....=
# A hashed hostname
|1|JfKTdBh7rNbXkVAQCRp4OQoPfmI=|USECr3SWf1JUPsms5AqfD5QfxkM= ssh-rsa
AAAA1234.....=
# A revoked key
@revoked * ssh-rsa AAAAB5W...
# A CA key, accepted for any host in *.mydomain.com or *.mydomain.org
@cert-authority *.mydomain.org,*.mydomain.com ssh-rsa AAAAB5W...
```

## FILES
~/.hushlogin

This file is used to suppress printing the last login time and /etc/motd, if PrintLastLog and PrintMotd, respectively, are enabled. It does not suppress printing of the banner specified by Banner.

~/.rhosts

This file is used for host-based authentication (see ssh(1) for more information). On some machines this file may need to be world-readable if the user's home directory is on an NFS partition, because sshd reads it as root. Additionally, this file must be owned by the user, and must not have write permissions for anyone else. The recommended permission for most machines is read/write for the user, and not accessible by others.

~/.shosts

This file is used in exactly the same way as .rhosts, but allows host-based authentication without permitting login with rlogin/rsh.

~/.ssh/

This directory is the default location for all user-specific configuration and authentication information. There is no general requirement to keep the entire contents of this directory secret, but the recommended permissions are read/write/execute for the user, and not accessible by others.

~/.ssh/authorized_keys

Lists the public keys (DSA, ECDSA, Ed25519, RSA) that can be used for logging in as this user. The format of this file is described above. The content of the file is not highly sensitive, but the recommended permissions are read/write for the user, and not accessible by others. If this file, the ~/.ssh directory, or the user's home directory are writable by other users, then the file could be modified or replaced by unauthorized users. In this case, sshd will not allow it to be used unless the StrictModes option has been set to “no”.

~/.ssh/environment

This file is read into the environment at login (if it exists). It can only contain empty lines, comment lines (that start with ‘#’), and assignment lines of the form name=value. The file should be writable only by the user; it need not be readable by anyone else. Environment processing is disabled by default and is controlled via the PermitUserEnvironment option.

~/.ssh/known_hosts

Contains a list of host keys for all hosts the user has logged into that are not already in the systemwide list of known host keys. The format of this file is described above. This file should be writable only by root/the owner and can, but need not be, world-readable.

~/.ssh/rc

Contains initialization routines to be run before the user's home directory becomes accessible. This file should be writable only by the user, and need not be readable by anyone else.

/etc/hosts.equiv

This file is for host-based authentication (see ssh(1)). It should only be writable by root.

/etc/openssh/moduli

Contains Diffie-Hellman groups used for the "Diffie-Hellman Group Exchange" key exchange method. The file format is described in moduli(5). If no usable groups are found in this file then fixed internal groups will be used.

/etc/motd

See motd(5).

/etc/nologin

If this file exists, sshd refuses to let anyone except root log in. The contents of the file are displayed to anyone trying to log in, and non-root connections are refused. The file should be world-readable.

/etc/openssh/shosts.equiv

This file is used in exactly the same way as hosts.equiv, but allows host-based authentication without permitting login with rlogin/rsh.

/etc/openssh/ssh_host_ecdsa_key

/etc/openssh/ssh_host_ed25519_key

/etc/openssh/ssh_host_rsa_key

These files contain the private parts of the host keys. These files should only be owned by root, readable only by root, and not accessible to others. Note that sshd does not start if these files are group/world-accessible.

/etc/openssh/ssh_host_ecdsa_key.pub

/etc/openssh/ssh_host_ed25519_key.pub

/etc/openssh/ssh_host_rsa_key.pub

These files contain the public parts of the host keys. These files should be world-readable but writable only by root. Their contents should match the respective private parts. These files are not really used for anything; they are provided for the convenience of the user so their contents can be copied to known hosts files. These files are created using ssh-keygen(1).

/etc/openssh/ssh_known_hosts

Systemwide list of known host keys. This file should be prepared by the system administrator to contain the public host keys of all machines in the organization. The format of this file is described above. This file should be writable only by root/the owner and should be world-readable.

/etc/openssh/sshd_config

Contains configuration data for sshd. The file format and configuration options are described in sshd_config(5).

/etc/openssh/sshrc

Similar to ~/.ssh/rc, it can be used to specify machine-specific login-time initializations globally. This file should be writable only by root, and should be world-readable.

/var/empty

chroot(2) directory used by sshd during privilege separation in the pre-authentication phase. The directory should not contain any files and must be owned by root and not group or world-writable.

/var/run/sshd.pid

Contains the process ID of the sshd listening for connections (if there are several daemons running concurrently for different ports, this contains the process ID of the one started last). The content of this file is not sensitive; it can be world-readable.

## SEE ALSO
scp(1), sftp(1), ssh(1), ssh-add(1), ssh-agent(1), ssh-keygen(1), ssh-keyscan(1), chroot(2), moduli(5), sshd_config(5), inetd(8), sftp-server(8)

## AUTHORS
OpenSSH is a derivative of the original and free ssh 1.2.12 release by Tatu Ylonen. Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, Theo de Raadt and Dug Song removed many bugs, re-added newer features and created OpenSSH. Markus Friedl contributed the support for SSH protocol versions 1.5 and 2.0. Niels Provos and Markus Friedl contributed support for privilege separation.

branch: sisyphus


openvas

package: openvas-scanner

title: openvas(8)

text:
# openvas(8)

## NAME
openvas - The Scanner of the Greenbone Vulnerability Management

## SYNOPSIS
openvas [-V] [-h] [-c config-file] [--scan-start scan-uuid] [-u] [-s] [-y]

## DESCRIPTION
Greenbone Vulnerability Management (GVM) is a vulnerability auditing and management framework made up of several modules. The OpenVAS Scanner, openvas is in charge of executing many security tests against many target hosts in a highly optimized way.

openvas inspects the remote hosts to list all the vulnerabilities and common misconfigurations that affects them.

It is a command line tool with parameters to update the feed of vulnerability tests and to start a scan. The second part of the interface is the redis store where the parameters about a scan task need to be placed and from where the results can be retrieved.

## OPTIONS
-c <config-file>, --config-file=<config-file>

Use the alternate configuration file instead of /etc/openvas/openvas.conf

-V, --version

Prints the version number and exits

-h, --help

Show a summary of the commands

--scan-start=<scan-uuid>

ID for a single scan task. The scanner will start the scan with the data already loaded in a redis KB, which will be found using the given scan-id.

--scan-stop=<scan-uuid>

ID for a single scan task. The scanner will search the redis kb associated to the given scan_id. It takes the pid from the kb and sends the SIGUSR1 kill signal to stop the scan.

-u, --update-vt-info

Updates VT info into redis store from VT files.

## THE CONFIGURATION FILE
The default openvas configuration file, /etc/openvas/openvas.conf contains these options:

plugins_folder

Contains the location of the plugins folder. This is usually /var/lib/openvas/plugins, but you may change this.

include_folders

Contains the location of the include file folder. This is usually /var/lib/openvas/plugins, but you may change this.

max_hosts

is maximum number of hosts to test at the same time which should be given to the client (which can override it). This value must be computed given your bandwidth, the number of hosts you want to test, your amount of memory and the horsepower of your processor(s).

max_checks

is the number of plugins that will run against each host being tested. Note that the total number of process will be max_checks x max_hosts so you need to find a balance between these two options. Note that launching too many plugins at the same time may disable the remote host, either temporarily (ie: inetd closes its ports) or definitely (the remote host crash because it is asked to do too many things at the same time), so be careful.

log_whole_attack

If this option is set to 'yes', openvas will store the name, pid, date and target of each plugin launched. This is helpful for monitoring and debugging purpose, however this option might make openvas fill your disk rather quickly.

db_address

Path to the redis socket where the plugins cache and knowledge bases are stored.

report_scripts

Stores in a file the script run duration in json format. This option expects a valid path to store a file with scripts stats. Script run durations are collected only if the log_whole_attack setting is set to 'yes'. This is helpful for monitoring and debugging purpose, however this option might make openvas fill your disk rather quickly.

debug_tls

This is an scanner-only option which allows you to set the TLS log level. The level is an integer between 0 and 9. Higher values mean more verbosity and might make openvas fill your disk rather quickly. The default value is 0 (disabled). Larger values should only be used with care, since they may reveal sensitive information in the scanner logs.

Use a debug level over 10 to enable all debugging options.

log_plugins_name_at_load

If this option is set to 'yes', openvas will log the name of each plugin being loaded at startup, or each time it receives the HUP signal.

cgi_path

By default, openvas looks for default CGIs in /cgi-bin and /scripts. You may change these to something else to reflect the policy of your site. The syntax of this option is the same as the shell $PATH variable: path1:path2:...

port_range

This is the default range of ports that the scanner plugins will probe. The syntax of this option is flexible, it can be a single range ("1-1500"), several ports ("21,23,80"), several ranges of ports ("1-1500,32000-33000"). Note that you can specify UDP and TCP ports by prefixing each range by T or U. For instance, the following range will make openvas scan UDP ports 1 to 1024 and TCP ports 1 to 65535 : "T:1-65535,U:1-1024".

test_alive_hosts_only

If this option is set to 'yes', openvas will scan the target list for alive hosts in a separate process while only testing those hosts which are identified as alive. This boosts the scan speed of target ranges with a high amount of dead hosts significantly.

alive_test_ports

Preference to set the port list for the TCP SYN and TCP ACK alive test methods. This setting overwrites the default port list: "21-23,25,53,80,110-111,135,139,143,443,445,993,995,1723,3306,3389,5900,8080".

test_alive_wait_timeout

This option is to set how long (in sec) Boreas (alive test) waits for replies after last packet was sent. Default: 3 seconds.

icmp_retries

This is the default amount of icmp packets that will be sent to the host target during an alive test. Defaults to 1.

icmp_grace_period

Wait time between icmp packets during alive tests. Useful for sensitive targets. It can slow down the alive test.

optimize_test

By default, optimize_test is enabled which means openvas does trust the remote host banners and is only launching plugins against the services they have been designed to check. For example it will check a web server claiming to be IIS only for IIS related flaws but will skip plugins testing for Apache flaws, and so on. This default behavior is used to optimize the scanning performance and to avoid false positives. If you are not sure that the banners of the remote host have been tampered with, you can disable this option.

optimization_level

Level of test optimization. It checks if plugins requirement are met. Level=1 checks only that required ports are open, level=2 checks open ports and keys requirements are met, else checks also if excluded keys are present or not. Default: no optimization, check everything.

test_empty_vhost

If set to yes, the scanner will also test the target by using empty vhost value in addition to the target's associated vhost values.

checks_read_timeout

Number of seconds that the security checks will wait for when doing a recv(). You should increase this value if you are running openvas across a slow network link (testing a host via a dialup connection for instance).

timeout_retry

Number of retries when a socket connection attempt timesout.

open_sock_max_attempts

When a port is found as opened at the beginning of the scan, and for some reason the status changes to filtered/closed, it will not be possible to open a socket. This is the number of unsuccessful retries to open the socket before to set the port as closed. This avoids to launch plugins which need the opened port as a mandatory key, therefore it avoids an overlong scan duration. If the set value is 0 or a negative value, this option is disabled. It should be take in account that one unsuccessful attempt needs the number of retries set in "timeout_retry".

time_between_request

Some devices do not appreciate quick connection establishment and termination neither quick request. This option allows you to set a wait time between two actions like to open a tcp socket, to send a request through the open tcp socket, and to close the tcp socket. This value should be given in milliseconds. If the set value is 0 (default value), this option is disabled and there is no wait time between requests.

expand_vhosts

Whether to expand the target host's list of vhosts with values gathered from sources such as reverse-lookup queries and VT checks for SSL/TLS certificates.

non_simult_ports

Some services (in particular SMB) do not appreciate multiple connections at the same time coming from the same host. This option allows you to prevent openvas to make two connections on the same given ports at the same time. The syntax of this option is "port1[, port2....]". Note that you can use the KB notation of openvas to designate a service formally. Ex: "139, Services/www", will prevent openvas from making two connections at the same time on port 139 and on every port which hosts a web server.

allow_simultaneous_ips

If set to no, this option prevent openvas to scan more than one different IPs (e.g. the IPv4 and IPv6 addresses) which belong to the same host at the same time. Default, yes.

plugins_timeout

This is the maximum lifetime, in seconds of a plugin. It may happen that some plugins are slow because of the way they are written or the way the remote server behaves. This option allows you to make sure your scan is never caught in an endless loop because of a non-finishing plugin. Doesn't affect ACT_SCANNER plugins.

scanner_plugins_timeout

Like plugins_timeout, but for ACT_SCANNER plugins.

max_vts_timeouts

During a scan it might happen that a host unexpectedly shuts down, a firewall blocks the traffic, a network device issue break the connection, etc. This leads to many NVT timeouts and long scan durations. This option checks the alive status of the host again after the provided amount of max NVT timeouts are reached. If the host is considered dead the scan will be stopped for this host. Otherwise the scan will continue. This option requires Boreas alive test to be enabled. Default: option not set, disabled.

safe_checks

Most of the time, openvas attempts to reproduce an exceptional condition to determine if the remote services are vulnerable to certain flaws. This includes the reproduction of buffer overflows or format strings, which may make the remote server crash. If you set this option to 'yes', openvas will disable the plugins which have the potential to crash the remote services, and will at the same time make several checks rely on the banner of the service tested instead of its behavior towards a certain input. This reduces false positives and makes openvas nicer towards your network, however this may make you miss important vulnerabilities (as a vulnerability affecting a given service may also affect another one).

auto_enable_dependencies

OpenVAS plugins use the result of each other to execute their job. For instance, a plugin which logs into the remote SMB registry will need the results of the plugin which finds the SMB name of the remote host and the results of the plugin which attempts to log into the remote host. If you want to only select a subset of the plugins available, tracking the dependencies can quickly become tiresome. If you set this option to 'yes', openvas will automatically enable the plugins that are depended on.

hosts_allow

Comma-separated list of the only targets that are authorized to be scanned. Supports the same syntax as the list targets. Both target hostnames and the address to which they resolve are checked. Hostnames in hosts_allow list are not resolved however.

hosts_deny

Comma-separated list of targets that are not authorized to be scanned. Supports the same syntax as the list targets. Both target hostnames and the address to which they resolve are checked. Hostnames in hosts_deny list are not resolved however.

sys_hosts_allow

Like hosts_allow. Can't be overridden by the client.

sys_hosts_deny

Like hosts_deny. Can't be overridden by the client.

max_sysload

Maximum load on the system. Once this load is reached, no further VTs are started until the load drops below this value again.

min_free_mem

Minimum available memory (in MB) which should be kept free on the system. Once this limit is reached, no further VTs are started until sufficient memory is available again.

max_mem_kb

Maximum amount of memory (in MB) allowed to use for a single script. If this value is set, the amount of memory put into redis is tracked for every Script. If the amount of memory exceeds this limit, the script is not able to set more kb items. The tracked the value written into redis is only estimated, as it does not check, if a value was replaced or appended. The size of the key is also not tracked. If this value is not set or <= 0, the maximum amount is unlimited (Default).

unscanned_closed

This defines whether TCP ports that were not scanned should be treated like closed ports. Defaults to "yes".

unscanned_closed_udp

This defines whether UDP ports that were not scanned should be treated as closed ports. Defaults to "yes".

table_driven_lsc

This option will enable table driven local security Checks (LSC). This means gathered packages are sent to a specialized scanner. This is far more efficient than doing checks via NASL. Defaults to true.

mqtt_server_uri

URI to the MQTT server used for internal communication with Notus (table driven LSC). This implementation of Notus is in python and it is deprecated, being replaced with a Rust implementation of Notus.

mqtt_user

Username for authenticated MQTT communication.

mqtt_pass

Password for authenticated MQTT communication.

openvasd_server

Openvasd server URI to Rust implementation of Notus. It has priority over MQTT settings.

x-apikey

API Key for authenticate against openvasd when Notus Rust implementation is enabled.

nasl_no_signature_check

Enable/disable the Feed signacture check. Pay attention to the negative logic of this setting. The other options in this file can usually be redefined by the client.

## NETWORK USAGE
Bear in mind that OpenVAS can be quite network intensive. Even if the OpenVAS developers have taken every effort to avoid packet loss (including transparently resending UDP packets, waiting for data to be received in TCP connections, etc.) so bandwidth use should always be closely monitored, with current server hardware, bandwidth is usually the bottleneck in a OpenVAS scan. It might not became too apparent in the final reports, scanners will still run, holes might be detected, but you will risk to run into false negatives (i.e. OpenVAS will not report a security hole that is present in a remote host)

Users might need to tune OpenVAS configuration if running the scanner in low bandwidth conditions (low being 'less bandwidth that the one your hardware system can produce) or otherwise will get erratic results. There are several parameters that can be modified to reduce network load:

checks_read_timeout

The default value is set to 5 seconds, that can (should) be increased if network bandwidth is low in the openvas.conf or openvasrc configuration files. Notice that it is recommended to increase this this value, if you are running a test outside your LAN (i.e. to Internet hosts through an Internet connection), to over 10 seconds.

max_hosts

Number of hosts to test at the same time. It can be as low as you want it to be (obviously 1 is the minimum)

max_checks

Number of checks to test at the same time it can be as low as you want it to be and it will also reduce network load and improve performance (obviously 1 is the minimum) Notice that OpenVAS will spawn max_hosts * max_checks processes.

drop_privileges

If this preference is set to 'yes', OpenVAS will attempt to drop its root privilege before launching any VT and the new process owner is 'nobody'; the default value of this preference is 'no', meaning no change in behaviour.

nasl_drop_privileges_user

If a user is set, NASL functions can use this user to drop its root privilege. The new process owner is set only for those process calling a nasl function which supports a drop privileges action. This preference must not be mixed with 'drop_privileges'. If 'drop_privileges' is enabled, this option should not be used, as 'drop_privileges' sets the owner to

vendor_version

Use the alternate vendor instead of the default one during scans. Other options might be using the QoS features offered by your server operating system or your network to improve the bandwidth use.

It is not easy to give a bandwidth estimate for a OpenVAS run, you will probably need to make your own counts. However, assuming you test 65536 TCP ports. This will require at least a single packet per port that is at least 40 bytes large. Add 14 bytes for the ethernet header and you will send 65536 * (40 + 14) = 3670016 bytes. So for just probing all TCP ports we may need a multitude of this as nmap will try to resend the packets twice if no response is received.

A very rough estimate is that a full scan for UDP, TCP and RPC as well as all NASL scripts may result in 8 to 32 MB worth of traffic per scanned host. Reducing the amount of tested part and such will reduce the amount of data to be transferred significantly.

## SEE ALSO
gvmd(8), gsad(8), ospd-openvas(8), openvas-nasl(1), openvas-nasl-lint(1),

## MORE INFORMATION
The canonical places where you will find more information about OpenVAS are:

Community Portal

Development Platform

Traditional home site

## AUTHORS
openvas was forked from nessusd in 2005. Nessusd was written by Renaud Deraison <deraison@cvs.nessus.org>. Most new code since 2005 developed by Greenbone AG.


puppet

package: openvox

title: puppet(8)

text:
# puppet(8)

## NAME
puppet - OpenVox is an automated configuration management tool

## SYNOPSIS
puppet subcommand [options] action [options]

## DESCRIPTION
OpenVox is a community implementation of Puppet, an automated administrative engine for your Linux, Unix, and Windows systems, designed to perform administrative tasks (such as adding users, installing packages, and updating server configurations) based on a centralized specification.

## COMMANDS

### Common
apply

Apply Puppet manifests locally via OpenVox

agent

The puppet agent daemon provided by OpenVox

config

Interact with OpenVox's settings.

help

Display OpenVox help.

lookup

Interactive Hiera lookup for OpenVox

module

Creates, installs and searches for modules on the Puppet Forge.

resource

The OpenVox resource abstraction layer shell

### Specialized
strings

Generate Puppet documentation with YARD.

catalog

Compile, save, view, and convert catalogs.

describe

Display help about resource types available to OpenVox

device

Manage remote network devices via OpenVox

doc

Generate Puppet references for OpenVox

epp

Interact directly with the EPP template parser/renderer.

facts

Retrieve and store facts.

filebucket

Store and retrieve files in an OpenVox filebucket

generate

Generates Puppet code from Ruby definitions.

node

View and manage node definitions.

parser

Interact directly with the parser.

plugin

Interact with the OpenVox plugin system.

script

Run a puppet manifests as a script without compiling a catalog

ssl

Manage SSL keys and certificates for OpenVox SSL clients

## SEE ALSO
See puppet help <subcommand> for help on a specific subcommand.

See puppet help <subcommand> <action> for help on a specific subcommand action.


puppet-agent

title: puppet-agent(8)

text:
# puppet-agent(8)

## NAME
puppet-agent - The puppet agent daemon provided by OpenVox

## SYNOPSIS
Retrieves the client configuration from the OpenVox server and applies it to the local host.

This service may be run as a daemon, run periodically using cron (or something similar), or run interactively for testing purposes.

## USAGE
puppet agent [--certname NAME] [-D|--daemonize|--no-daemonize] [-d|--debug] [--detailed-exitcodes] [--digest DIGEST] [--disable [MESSAGE]] [--enable] [--fingerprint] [-h|--help] [-l|--logdest syslog|eventlog|ABS FILEPATH|console] [--serverport PORT] [--noop] [-o|--onetime] [--sourceaddress IP_ADDRESS] [-t|--test] [-v|--verbose] [-V|--version] [-w|--waitforcert SECONDS]

## DESCRIPTION
This is the main puppet client. Its job is to retrieve the local machine's configuration from a remote server and apply it. In order to successfully communicate with the remote server, the client must have a certificate signed by a certificate authority that the server trusts; the recommended method for this, at the moment, is to run a certificate authority as part of the puppet server (which is the default). The client will connect and request a signed certificate, and will continue connecting until it receives one.

Once the client has a signed certificate, it will retrieve its configuration and apply it.

## USAGE NOTES
'puppet agent' does its best to find a compromise between interactive use and daemon use. If you run it with no arguments and no configuration, it goes into the background, attempts to get a signed certificate, and retrieves and applies its configuration every 30 minutes.

Some flags are meant specifically for interactive use -- in particular, 'test', 'tags' and 'fingerprint' are useful.

'--test' runs once in the foreground with verbose logging, then exits. It also exits if it can't get a valid catalog. --test includes the '--detailed-exitcodes' option by default and exits with one of the following exit codes:

- 0: The run succeeded with no changes or failures; the system was already in the desired state.

- 1: The run failed, or wasn't attempted due to another run already in progress.

- 2: The run succeeded, and some resources were changed.

- 4: The run succeeded, and some resources failed.

- 6: The run succeeded, and included both changes and failures.

'--tags' allows you to specify what portions of a configuration you want to apply. Puppet elements are tagged with all of the class or definition names that contain them, and you can use the 'tags' flag to specify one of these names, causing only configuration elements contained within that class or definition to be applied. This is very useful when you are testing new configurations -- for instance, if you are just starting to manage 'ntpd', you would put all of the new elements into an 'ntpd' class, and call puppet with '--tags ntpd', which would only apply that small portion of the configuration during your testing, rather than applying the whole thing.

'--fingerprint' is a one-time flag. In this mode 'puppet agent' runs once and displays on the console (and in the log) the current certificate (or certificate request) fingerprint. Providing the '--digest' option allows you to use a different digest algorithm to generate the fingerprint. The main use is to verify that before signing a certificate request on the master, the certificate request the master received is the same as the one the client sent (to prevent against man-in-the-middle attacks when signing certificates).

'--skip_tags' is a flag used to filter resources. If this is set, then only resources not tagged with the specified tags will be applied. Values must be comma-separated.

## OPTIONS
Note that any Puppet setting that's valid in the configuration file is also a valid long argument. For example, 'server' is a valid setting, so you can specify '--server servername' as an argument. Boolean settings accept a '--no-' prefix to turn off a behavior, translating into '--setting' and '--no-setting' pairs, such as --daemonize and --no-daemonize.

See the configuration file documentation at https://puppet.com/docs/puppet/latest/configuration.html for the full list of acceptable settings. A commented list of all settings can also be generated by running puppet agent with '--genconfig'.

- --certname: Set the certname (unique ID) of the client. The master reads this unique identifying string, which is usually set to the node's fully-qualified domain name, to determine which configurations the node will receive. Use this option to debug setup problems or implement unusual node identification schemes. (This is a Puppet setting, and can go in puppet.conf.)

- --daemonize: Send the process into the background. This is the default. (This is a Puppet setting, and can go in puppet.conf. Note the special 'no-' prefix for boolean settings on the command line.)

- --no-daemonize: Do not send the process into the background. (This is a Puppet setting, and can go in puppet.conf. Note the special 'no-' prefix for boolean settings on the command line.)

- --debug: Enable full debugging.

- --detailed-exitcodes: Provide extra information about the run via exit codes; works only if '--test' or '--onetime' is also specified. If enabled, 'puppet agent' uses the following exit codes:

0: The run succeeded with no changes or failures; the system was already in the desired state.

1: The run failed, or wasn't attempted due to another run already in progress.

2: The run succeeded, and some resources were changed.

4: The run succeeded, and some resources failed.

6: The run succeeded, and included both changes and failures.

- --digest: Change the certificate fingerprinting digest algorithm. The default is SHA256. Valid values depends on the version of OpenSSL installed, but will likely contain MD5, MD2, SHA1 and SHA256.

- --disable: Disable working on the local system. This puts a lock file in place, causing 'puppet agent' not to work on the system until the lock file is removed. This is useful if you are testing a configuration and do not want the central configuration to override the local state until everything is tested and committed.

Disable can also take an optional message that will be reported by the 'puppet agent' at the next disabled run.

'puppet agent' uses the same lock file while it is running, so no more than one 'puppet agent' process is working at a time.

'puppet agent' exits after executing this.

•

--enable: Enable working on the local system. This removes any lock file, causing 'puppet agent' to start managing the local system again However, it continues to use its normal scheduling, so it might not start for another half hour.

'puppet agent' exits after executing this.

- --evaltrace: Logs each resource as it is being evaluated. This allows you to interactively see exactly what is being done. (This is a Puppet setting, and can go in puppet.conf. Note the special 'no-' prefix for boolean settings on the command line.)

- --fingerprint: Display the current certificate or certificate signing request fingerprint and then exit. Use the '--digest' option to change the digest algorithm used.

- --help: Print this help message

- --job-id: Attach the specified job id to the catalog request and the report used for this agent run. This option only works when '--onetime' is used. When using Puppet Enterprise this flag should not be used as the orchestrator sets the job-id for you and it must be unique.

- --logdest: Where to send log messages. Choose between 'syslog' (the POSIX syslog service), 'eventlog' (the Windows Event Log), 'console', or the path to a log file. If debugging or verbosity is enabled, this defaults to 'console'. Otherwise, it defaults to 'syslog' on POSIX systems and 'eventlog' on Windows. Multiple destinations can be set using a comma separated list (eg: /path/file1,console,/path/file2)"

A path ending with '.json' will receive structured output in JSON format. The log file will not have an ending ']' automatically written to it due to the appending nature of logging. It must be appended manually to make the content valid JSON.

A path ending with '.jsonl' will receive structured output in JSON Lines format.

- --masterport: The port on which to contact the Puppet Server. (This is a Puppet setting, and can go in puppet.conf. Deprecated in favor of the 'serverport' setting.)

- --noop: Use 'noop' mode where the daemon runs in a no-op or dry-run mode. This is useful for seeing what changes Puppet would make without actually executing the changes. (This is a Puppet setting, and can go in puppet.conf. Note the special 'no-' prefix for boolean settings on the command line.)

- --onetime: Run the configuration once. Runs a single (normally daemonized) Puppet run. Useful for interactively running puppet agent when used in conjunction with the --no-daemonize option. (This is a Puppet setting, and can go in puppet.conf. Note the special 'no-' prefix for boolean settings on the command line.)

- --serverport: The port on which to contact the Puppet Server. (This is a Puppet setting, and can go in puppet.conf.)

- --sourceaddress: Set the source IP address for transactions. This defaults to automatically selected. (This is a Puppet setting, and can go in puppet.conf.)

- --test: Enable the most common options used for testing. These are 'onetime', 'verbose', 'no-daemonize', 'no-usecacheonfailure', 'detailed-exitcodes', 'no-splay', and 'show_diff'.

- --trace Prints stack traces on some errors. (This is a Puppet setting, and can go in puppet.conf. Note the special 'no-' prefix for boolean settings on the command line.)

- --verbose: Turn on verbose reporting.

- --version: Print the puppet version number and exit.

- --waitforcert: This option only matters for daemons that do not yet have certificates and it is enabled by default, with a value of 120 (seconds). This causes 'puppet agent' to connect to the server every 2 minutes and ask it to sign a certificate request. This is useful for the initial setup of a puppet client. You can turn off waiting for certificates by specifying a time of 0. (This is a Puppet setting, and can go in puppet.conf.)

- --write_catalog_summary After compiling the catalog saves the resource list and classes list to the node in the state directory named classes.txt and resources.txt (This is a Puppet setting, and can go in puppet.conf.)

## EXAMPLE

```
$ puppet agent --server puppet.domain.com
```

## DIAGNOSTICS
Puppet agent accepts the following signals:

SIGHUP

Restart the puppet agent daemon.

SIGINT and SIGTERM

Shut down the puppet agent daemon.

SIGUSR1

Immediately retrieve and apply configurations from the puppet master.

SIGUSR2

Close file descriptors for log files and reopen them. Used with logrotate.

## AUTHOR
Luke Kanies

## COPYRIGHT
Copyright (c) 2011 Puppet Inc. Copyright (c) 2024 Vox Pupuli Licensed under the Apache 2.0 License


puppet-apply

title: puppet-apply(8)

text:
# puppet-apply(8)

## NAME
puppet-apply - Apply Puppet manifests locally via OpenVox

## SYNOPSIS
Applies a standalone Puppet manifest to the local system.

## USAGE
puppet apply [-h|--help] [-V|--version] [-d|--debug] [-v|--verbose] [-e|--execute] [--detailed-exitcodes] [-L|--loadclasses] [-l|--logdest syslog|eventlog|ABS FILEPATH|console] [--noop] [--catalog catalog] [--write-catalog-summary] file

## DESCRIPTION
This is the standalone puppet execution tool; use it to apply individual manifests.

When provided with a modulepath, via command line or config file, puppet apply can effectively mimic the catalog that would be served by OpenVox server with access to the same modules, although there are some subtle differences. When combined with scheduling and an automated system for pushing manifests, this can be used to implement a serverless site.

Most users should use 'puppet agent' and 'puppet master' for site-wide manifests.

## OPTIONS
Any setting that's valid in the configuration file is a valid long argument for puppet apply. For example, 'tags' is a valid setting, so you can specify '--tags class,tag' as an argument.

See the configuration file documentation at https://puppet.com/docs/puppet/latest/configuration.html for the full list of acceptable parameters. You can generate a commented list of all configuration options by running puppet with '--genconfig'.

- --debug: Enable full debugging.

- --detailed-exitcodes: Provide extra information about the run via exit codes. If enabled, 'puppet apply' will use the following exit codes:

0: The run succeeded with no changes or failures; the system was already in the desired state.

1: The run failed.

2: The run succeeded, and some resources were changed.

4: The run succeeded, and some resources failed.

6: The run succeeded, and included both changes and failures.

- --help: Print this help message

- --loadclasses: Load any stored classes. 'puppet agent' caches configured classes (usually at /etc/puppetlabs/puppet/classes.txt), and setting this option causes all of those classes to be set in your puppet manifest.

- --logdest: Where to send log messages. Choose between 'syslog' (the POSIX syslog service), 'eventlog' (the Windows Event Log), 'console', or the path to a log file. Defaults to 'console'. Multiple destinations can be set using a comma separated list (eg: /path/file1,console,/path/file2)"

A path ending with '.json' will receive structured output in JSON format. The log file will not have an ending ']' automatically written to it due to the appending nature of logging. It must be appended manually to make the content valid JSON.

A path ending with '.jsonl' will receive structured output in JSON Lines format.

- --noop: Use 'noop' mode where Puppet runs in a no-op or dry-run mode. This is useful for seeing what changes Puppet will make without actually executing the changes.

- --execute: Execute a specific piece of Puppet code

- --test: Enable the most common options used for testing. These are 'verbose', 'detailed-exitcodes' and 'show_diff'.

- --verbose: Print extra information.

- --catalog: Apply a JSON catalog (such as one generated with 'puppet master --compile'). You can either specify a JSON file or pipe in JSON from standard input.

- --write-catalog-summary After compiling the catalog saves the resource list and classes list to the node in the state directory named classes.txt and resources.txt

## EXAMPLE

```
$ puppet apply -e 'notify { "hello world": }'
$ puppet apply -l /tmp/manifest.log manifest.pp
$ puppet apply --modulepath=/root/dev/modules -e "include ntpd::server"
$ puppet apply --catalog catalog.json
```

## AUTHOR
Luke Kanies

## COPYRIGHT
Copyright (c) 2011 Puppet Inc. Copyright (c) 2024 Vox Pupuli Licensed under the Apache 2.0 License


puppet-catalog

title: puppet-catalog(8)

summary: Compile, save, view, and convert catalogs\.

text:
# puppet-catalog(8)

## NAME
puppet-catalog - Compile, save, view, and convert catalogs.

## SYNOPSIS
puppet catalog action [--terminus _TERMINUS]

## DESCRIPTION
This subcommand deals with catalogs, which are compiled per-node artifacts generated from a set of Puppet manifests. By default, it interacts with the compiling subsystem and compiles a catalog using the default manifest and certname, but you can change the source of the catalog with the --terminus option. You can also choose to print any catalog in 'dot' format (for easy graph viewing with OmniGraffle or Graphviz) with '--render-as dot'.

## OPTIONS
Note that any setting that's valid in the configuration file is also a valid long argument, although it may or may not be relevant to the present action. For example, server and run_mode are valid settings, so you can specify --server <servername>, or --run_mode <runmode> as an argument.

See the configuration file documentation at https://puppet.com/docs/puppet/latest/configuration.html for the full list of acceptable parameters. A commented list of all configuration options can also be generated by running puppet with --genconfig.

--render-as FORMAT

The format in which to render output. The most common formats are json, s (string), yaml, and console, but other options such as dot are sometimes available.

--verbose

Whether to log verbosely.

--debug

Whether to log debug information.

--terminus _TERMINUS

Indirector faces expose indirected subsystems of Puppet. These subsystems are each able to retrieve and alter a specific type of data (with the familiar actions of find, search, save, and destroy) from an arbitrary number of pluggable backends. In Puppet parlance, these backends are called terminuses.

Almost all indirected subsystems have a rest terminus that interacts with the puppet master's data. Most of them have additional terminuses for various local data models, which are in turn used by the indirected subsystem on the puppet master whenever it receives a remote request.

The terminus for an action is often determined by context, but occasionally needs to be set explicitly. See the "Notes" section of this face's manpage for more details.

## ACTIONS
apply - Find and apply a catalog.

SYNOPSIS

puppet catalog apply [--terminus _TERMINUS]

DESCRIPTION

Finds and applies a catalog. This action takes no arguments, but the source of the catalog can be managed with the --terminus option.

RETURNS

Nothing. When used from the Ruby API, returns a Puppet::Transaction::Report object.

compile - Compile a catalog.

SYNOPSIS

puppet catalog compile [--terminus _TERMINUS]

DESCRIPTION

Compiles a catalog locally for a node, requiring access to modules, node classifier, etc.

RETURNS

A serialized catalog.

download - Download this node's catalog from the puppet master server.

SYNOPSIS

puppet catalog download [--terminus _TERMINUS]

DESCRIPTION

Retrieves a catalog from the puppet master and saves it to the local yaml cache. This action always contacts the puppet master and will ignore alternate termini.

The saved catalog can be used in any subsequent catalog action by specifying '--terminus yaml' for that action.

RETURNS

Nothing.

NOTES

When used from the Ruby API, this action has a side effect of leaving Puppet::Resource::Catalog.indirection.terminus_class set to yaml. The terminus must be explicitly re-set for subsequent catalog actions.

find - Retrieve the catalog for the node from which the command is run.

SYNOPSIS

puppet catalog find [--terminus _TERMINUS] [--facts_for_catalog] certname, facts

DESCRIPTION

Retrieve the catalog for the node from which the command is run.

OPTIONS --facts_for_catalog - Not implemented for the CLI; facts are collected internally.

RETURNS

A serialized catalog. When used from the Ruby API, returns a Puppet::Resource::Catalog object.

info - Print the default terminus class for this face.

SYNOPSIS

puppet catalog info [--terminus _TERMINUS]

DESCRIPTION

Prints the default terminus class for this subcommand. Note that different run modes may have different default termini; when in doubt, specify the run mode with the '--run_mode' option.

save - API only: create or overwrite an object.

SYNOPSIS

puppet catalog save [--terminus _TERMINUS] key

DESCRIPTION

API only: create or overwrite an object. As the Faces framework does not currently accept data from STDIN, save actions cannot currently be invoked from the command line.

select - Retrieve a catalog and filter it for resources of a given type.

SYNOPSIS

puppet catalog select [--terminus _TERMINUS] host resource_type

DESCRIPTION

Retrieves a catalog for the specified host, then searches it for all resources of the requested type.

RETURNS

A list of resource references ("Type[title]"). When used from the API, returns an array of Puppet::Resource objects excised from a catalog.

NOTES

By default, this action will retrieve a catalog from Puppet's compiler subsystem; you must call the action with --terminus rest if you wish to retrieve a catalog from the puppet master.

FORMATTING ISSUES: This action cannot currently render useful yaml; instead, it returns an entire catalog. Use json instead.

## EXAMPLES
apply

Apply the locally cached catalog:

$ puppet catalog apply --terminus yaml

Retrieve a catalog from the master and apply it, in one step:

$ puppet catalog apply --terminus rest

API example:

```
# ...
Puppet::Face[:catalog, '0.0.1'].download
# (Termini are singletons; catalog.download has a side effect of
# setting the catalog terminus to yaml)
report  = Puppet::Face[:catalog, '0.0.1'].apply
# ...
```

compile

Compile catalog for node 'mynode':

$ puppet catalog compile mynode --codedir ...

download

Retrieve and store a catalog:

$ puppet catalog download

API example:

```
Puppet::Face[:plugin, '0.0.1'].download
Puppet::Face[:facts, '0.0.1'].upload
Puppet::Face[:catalog, '0.0.1'].download
# ...
```

select

Ask the puppet master for a list of managed file resources for a node:

$ puppet catalog select --terminus rest somenode.magpie.lan file

## NOTES
This subcommand is an indirector face, which exposes find, search, save, and destroy actions for an indirected subsystem of Puppet. Valid termini for this face include:

- compiler

- json

- msgpack

- rest

- store_configs

- yaml

## COPYRIGHT AND LICENSE
Copyright 2011 by Puppet Inc., Vox Pupuli Apache 2 license; see COPYING


puppet-config

title: puppet-config(8)

summary: Interact with OpenVox's settings\.

text:
# puppet-config(8)

## NAME
puppet-config - Interact with OpenVox's settings.

## SYNOPSIS
puppet config action [--section SECTION_NAME]

## DESCRIPTION
This subcommand can inspect and modify settings from OpenVox's 'puppet.conf' configuration file. For documentation about individual settings, see https://puppet.com/docs/puppet/latest/configuration.html.

## OPTIONS
Note that any setting that's valid in the configuration file is also a valid long argument, although it may or may not be relevant to the present action. For example, server and run_mode are valid settings, so you can specify --server <servername>, or --run_mode <runmode> as an argument.

See the configuration file documentation at https://puppet.com/docs/puppet/latest/configuration.html for the full list of acceptable parameters. A commented list of all configuration options can also be generated by running puppet with --genconfig.

--render-as FORMAT

The format in which to render output. The most common formats are json, s (string), yaml, and console, but other options such as dot are sometimes available.

--verbose

Whether to log verbosely.

--debug

Whether to log debug information.

--section SECTION_NAME

The section of the puppet.conf configuration file to interact with.

The three most commonly used sections are 'main', 'server', and 'agent'. 'Main' is the default, and is used by all OpenVox applications. Other sections can override 'main' values for specific applications -- the 'server' section affects Puppet Server, and the 'agent' section affects puppet agent.

Less commonly used is the 'user' section, which affects puppet apply. Any other section will be treated as the name of a legacy environment (a deprecated feature), and can only include the 'manifest' and 'modulepath' settings.

## ACTIONS
delete - Delete an OpenVox setting.

SYNOPSIS

puppet config delete [--section SECTION_NAME] setting

DESCRIPTION

Deletes a setting from the specified section. (The default is the section 'main').

NOTES

By default, this action deletes the configuration setting from the 'main' configuration domain. Use the '--section' flags to delete settings from other configuration domains.

print - Examine OpenVox's current settings.

SYNOPSIS

puppet config print [--section SECTION_NAME] all | setting [setting ...]

DESCRIPTION

Prints the value of a single setting or a list of settings.

This action is a replacement interface to the information available with puppet <subcommand> --configprint.

NOTES

By default, this action reads the general configuration in the 'main' section. Use the '--section' and '--environment' flags to examine other configuration domains.

set - Set OpenVox's settings.

SYNOPSIS

puppet config set [--section SECTION_NAME] [setting_name] [setting_value]

DESCRIPTION

Updates values in the puppet.conf configuration file.

NOTES

By default, this action manipulates the configuration in the 'main' section. Use the '--section' flag to manipulate other configuration domains.

## EXAMPLES
delete

Delete the setting 'setting_name' from the 'main' configuration domain:

$ puppet config delete setting_name

Delete the setting 'setting_name' from the 'server' configuration domain:

$ puppet config delete setting_name --section server

print

Get puppet's runfile directory:

$ puppet config print rundir

Get a list of important directories from the server's config:

$ puppet config print all --section server | grep -E "(path|dir)"

set

Set puppet's runfile directory:

$ puppet config set rundir /var/run/puppetlabs

Set the vardir for only the agent:

$ puppet config set vardir /opt/puppetlabs/puppet/cache --section agent

## COPYRIGHT AND LICENSE
Copyright 2011 by Puppet Inc., Vox Pupuli Apache 2 license; see COPYING


puppet-describe

title: puppet-describe(8)

text:
# puppet-describe(8)

## NAME
puppet-describe - Display help about resource types available to OpenVox

## SYNOPSIS
Prints help about Puppet resource types, providers, and metaparameters installed on an OpenVox node.

## USAGE
puppet describe [-h|--help] [-s|--short] [-p|--providers] [-l|--list] [-m|--meta]

## OPTIONS
--help

Print this help text

--providers

Describe providers in detail for each type

--list

List all types

--meta

List all metaparameters

--short

List only parameters without detail

## EXAMPLE

```
$ puppet describe --list
$ puppet describe file --providers
$ puppet describe user -s -m
```

## AUTHOR
David Lutterkort

## COPYRIGHT
Copyright (c) 2011 Puppet Inc. Copyright (c) 2024 Vox Pupuli Licensed under the Apache 2.0 License


puppet-device

title: puppet-device(8)

text:
# puppet-device(8)

## NAME
puppet-device - Manage remote network devices via OpenVox

## SYNOPSIS
Retrieves catalogs from the OpenVox server and applies them to remote devices.

This subcommand can be run manually; or periodically using cron, a scheduled task, or a similar tool.

## USAGE
puppet device [-h|--help] [-v|--verbose] [-d|--debug] [-l|--logdest syslog|file|console] [--detailed-exitcodes] [--deviceconfig file] [-w|--waitforcert seconds] [--libdir directory] [-a|--apply file] [-f|--facts] [-r|--resource type [name]] [-t|--target device] [--user=user] [-V|--version]

## DESCRIPTION
Devices require a proxy OpenVox agent to request certificates, collect facts, retrieve and apply catalogs, and store reports.

## USAGE NOTES
Devices managed by the puppet-device subcommand on an OpenVox agent are configured in device.conf, which is located at $confdir/device.conf by default, and is configurable with the $deviceconfig setting.

The device.conf file is an INI-like file, with one section per device:

[DEVICE_CERTNAME] type TYPE url URL debug

The section name specifies the certname of the device.

The values for the type and url properties are specific to each type of device.

The optional debug property specifies transport-level debugging, and is limited to telnet and ssh transports.

See https://puppet.com/docs/puppet/latest/config_file_device.html for details.

## OPTIONS
Note that any setting that's valid in the configuration file is also a valid long argument. For example, 'server' is a valid configuration parameter, so you can specify '--server servername' as an argument.

--help, -h

Print this help message

--verbose, -v

Turn on verbose reporting.

--debug, -d

Enable full debugging.

--logdest, -l

Where to send log messages. Choose between 'syslog' (the POSIX syslog service), 'console', or the path to a log file. If debugging or verbosity is enabled, this defaults to 'console'. Otherwise, it defaults to 'syslog'. Multiple destinations can be set using a comma separated list (eg: /path/file1,console,/path/file2)"

A path ending with '.json' will receive structured output in JSON format. The log file will not have an ending ']' automatically written to it due to the appending nature of logging. It must be appended manually to make the content valid JSON.

--detailed-exitcodes

Provide transaction information via exit codes. If this is enabled, an exit code of '1' means at least one device had a compile failure, an exit code of '2' means at least one device had resource changes, and an exit code of '4' means at least one device had resource failures. Exit codes of '3', '5', '6', or '7' means that a bitwise combination of the preceding exit codes happened.

--deviceconfig

Path to the device config file for puppet device. Default: $confdir/device.conf

--waitforcert, -w

This option only matters for targets that do not yet have certificates and it is enabled by default, with a value of 120 (seconds). This causes +puppet device+ to poll the server every 2 minutes and ask it to sign a certificate request. This is useful for the initial setup of a target. You can turn off waiting for certificates by specifying a time of 0.

--libdir

Override the per-device libdir with a local directory. Specifying a libdir also disables pluginsync. This is useful for testing.

A path ending with '.jsonl' will receive structured output in JSON Lines format.

--apply

Apply a manifest against a remote target. Target must be specified.

--facts

Displays the facts of a remote target. Target must be specified.

--resource

Displays a resource state as Puppet code, roughly equivalent to puppet resource. Can be filtered by title. Requires --target be specified.

--target

Target a specific device/certificate in the device.conf. Doing so will perform a device run against only that device/certificate.

--to_yaml

Output found resources in yaml format, suitable to use with Hiera and create_resources.

--user

The user to run as.

## EXAMPLE

```
  $ puppet device --target remotehost --verbose
```

## AUTHOR
Brice Figureau

## COPYRIGHT
Copyright (c) 2011-2018 Puppet Inc., Copyright (c) 2024 Vox Pupuli Licensed under the Apache 2.0 License


puppet-doc

title: puppet-doc(8)

summary: Generate Puppet references for OpenVox

text:
# puppet-doc(8)

## NAME
puppet-doc - Generate Puppet references for OpenVox

## SYNOPSIS
Generates a reference for all Puppet types. Largely meant for internal use. (Deprecated)

## USAGE
puppet doc [-h|--help] [-l|--list] [-r|--reference reference-name]

## DESCRIPTION
This deprecated command generates a Markdown document to stdout describing all installed Puppet types or all allowable arguments to puppet executables. It is largely meant for internal use and is used to generate the reference documents which can be posted to a website.

For Puppet module documentation (and all other use cases) this command has been superseded by the "puppet-strings" module - see https://github.com/puppetlabs/puppetlabs-strings for more information.

This command (puppet-doc) will be removed once the puppetlabs internal documentation processing pipeline is completely based on puppet-strings.

## OPTIONS
--help

Print this help message

--reference

Build a particular reference. Get a list of references by running 'puppet doc --list'.

## EXAMPLE

```
$ puppet doc -r type > /tmp/type_reference.markdown
```

## AUTHOR
Luke Kanies

## COPYRIGHT
Copyright (c) 2011 Puppet Inc. Copyright (c) 2024 Vox Pupuli Licensed under the Apache 2.0 License


puppet-epp

title: puppet-epp(8)

summary: Interact directly with the EPP template parser/renderer\.

text:
# puppet-epp(8)

## NAME
puppet-epp - Interact directly with the EPP template parser/renderer.

## SYNOPSIS
puppet epp action

## OPTIONS
Note that any setting that's valid in the configuration file is also a valid long argument, although it may or may not be relevant to the present action. For example, server and run_mode are valid settings, so you can specify --server <servername>, or --run_mode <runmode> as an argument.

See the configuration file documentation at https://puppet.com/docs/puppet/latest/configuration.html for the full list of acceptable parameters. A commented list of all configuration options can also be generated by running puppet with --genconfig.

--render-as FORMAT

The format in which to render output. The most common formats are json, s (string), yaml, and console, but other options such as dot are sometimes available.

--verbose

Whether to log verbosely.

--debug

Whether to log debug information.

## ACTIONS
•

dump - Outputs a dump of the internal template parse tree for debugging: SYNOPSIS

puppet epp dump [--e source] [--[no-]validate] [--format old, pn, or json] [--pretty] [--[no-]header] [--format old|pn|json] [--pretty] { -e source | [templates ...] }

DESCRIPTION

The dump action parses and validates the EPP syntax and dumps the resulting AST model in a human readable (but not necessarily an easy to understand) format.

The output format can be controlled using the --format old|pn|json where:

- 'old' is the default, but now deprecated format which is not API.

- 'pn' is the Puppet Extended S-Expression Notation.

- 'json' outputs the same graph as 'pn' but with JSON syntax.

The output will be "pretty printed" when the option --pretty is given together with --format 'pn' or 'json'. This option has no effect on the 'old' format.

The command accepts one or more templates (.epp) files, or an -e followed by the template source text. The given templates can be paths to template files, or references to templates in modules when given on the form modulename/template-name.epp. If no arguments are given, the stdin is read (unless it is attached to a terminal)

If multiple templates are given, they are separated with a header indicating the name of the template. This can be suppressed with the option --no-header. The option --[no-]header has no effect when a single template is dumped.

When debugging the epp parser itself, it may be useful to suppress the validation step with the --no-validate option to observe what the parser produced from the given source.

This command ignores the --render-as setting/option.

OPTIONS --e <source> - Dump one epp source expression given on the command line.

--format <old, pn, or json> - Get result in 'old' (deprecated format), 'pn' (new format), or 'json' (new format in JSON).

--[no-]header - Whether or not to show a file name header between files.

--pretty - Pretty print output. Only applicable together with --format pn or json

--[no-]validate - Whether or not to validate the parsed result, if no-validate only syntax errors are reported.

RETURNS

A dump of the resulting AST model unless there are syntax or validation errors.

•

render - Renders an epp template as text: SYNOPSIS

puppet epp render [--node node_name] [--e source] [--values values_hash] [--values_file pp_or_yaml_file] [--facts facts_file] [--[no-]header] -e source | [templates ...]

DESCRIPTION

This action renders one or more EPP templates.

The command accepts one or more templates (.epp files), given the same way as templates are given to the puppet epp function (a full path, or a relative reference on the form 'modulename/template-name.epp'), or as a relative path.args In case the given path matches both a modulename/template and a file, the template from the module is used.

An inline_epp equivalent can also be performed by giving the template after an -e, or by piping the EPP source text to the command.

Values to the template can be defined using the Puppet Language on the command line with --values or in a .pp or .yaml file referenced with --values_file. If specifying both the result is merged with --values having higher precedence.

The --values option allows a Puppet Language sequence of expressions to be defined on the command line the same way as it may be given in a .pp file referenced with --values_file. It may set variable values (that become available in the template), and must produce either undef or a Hash of values (the hash may be empty). Producing undef simulates that the template is called without an arguments hash and thus only references variables in its outer scope. When a hash is given, a template is limited to seeing only the global scope. It is thus possible to simulate the different types of calls to the epp and inline_epp functions, with or without a given hash. Note that if variables are given, they are always available in this simulation - to test that the template only references variables given as arguments, produce a hash in --values or the --values_file, do not specify any variables that are not global, and turn on --strict_variables setting.

If multiple templates are given, the same set of values are given to each template. If both --values and --value_file are used, the --values are merged on top of those given in the file.

When multiple templates are rendered, a separating header is output between the templates showing the name of the template before the output. The header output can be turned off with --no-header. This also concatenates the template results without any added newline separators.

Facts from the node where the command is being run are used by default.args Facts can be obtained for other nodes if they have called in, and reported their facts by using the --node <nodename> flag.

Overriding node facts as well as additional facts can be given in a .yaml or .json file and referencing it with the --facts option. (Values can be obtained in yaml format directly from facter, or from puppet for a given node). Note that it is not possible to simulate the reserved variable name $facts in any other way.

Note that it is not possible to set variables using the Puppet Language that have the same names as facts as this result in an error; "attempt to redefine a variable" since facts are set first.

Exits with 0 if there were no validation errors. On errors, no rendered output is produced for that template file.

When designing EPP templates, it is strongly recommended to define all template arguments in the template, and to give them in a hash when calling epp or inline_epp and to use as few global variables as possible, preferably only the $facts hash. This makes templates more free standing and are easier to reuse, and to test.

OPTIONS --e <source> - Render one inline epp template given on the command line.

--facts <facts_file> - A .yaml or .json file containing a hash of facts made available in $facts and $trusted

--[no-]header - Whether or not to show a file name header between rendered results.

--node <node_name> - The name of the node for which facts are obtained. Defaults to facts for the local node.

--values <values_hash> - A Hash in Puppet DSL form given as arguments to the template being rendered.

--values_file <pp_or_yaml_file> - A .pp or .yaml file that is processed to produce a hash of values for the template.

RETURNS

A rendered result of one or more given templates.

•

validate - Validate the syntax of one or more EPP templates.: SYNOPSIS

puppet epp validate [--[no-]continue_on_error] [template] [template ...]

DESCRIPTION

This action validates EPP syntax without producing any output.

When validating, multiple issues per file are reported up to the settings of max_error, and max_warnings. The processing stops after having reported issues for the first encountered file with errors unless the option --continue_on_error is given.

Files can be given using the modulename/template.epp style to lookup the template from a module, or be given as a reference to a file. If the reference to a file can be resolved against a template in a module, the module version wins - in this case use an absolute path to reference the template file if the module version is not wanted.

Exits with 0 if there were no validation errors.

OPTIONS --[no-]continue_on_error - Whether or not to continue after errors are reported for a template.

RETURNS

Nothing, or encountered syntax errors.

## EXAMPLES
render

Render the template in module 'mymodule' called 'mytemplate.epp', and give it two arguments a and b:

```
$ puppet epp render mymodule/mytemplate.epp --values '{a => 10, b => 20}'
```

Render a template using an absolute path:

```
$ puppet epp render /tmp/testing/mytemplate.epp --values '{a => 10, b => 20}'
```

Render a template with data from a .pp file:

```
$ puppet epp render /tmp/testing/mytemplate.epp --values_file mydata.pp
```

Render a template with data from a .pp file and override one value on the command line:

```
$ puppet epp render /tmp/testing/mytemplate.epp --values_file mydata.pp --values '{a=>10}'
```

Render from STDIN:

```
$ cat template.epp | puppet epp render --values '{a => 10, b => 20}'
```

Set variables in a .pp file and render a template that uses variable references:

```
# data.pp file
$greeted = 'a global var'
undef
$ puppet epp render -e 'hello <%= $greeted %>' --values_file data.pp
```

Render a template that outputs a fact:

```
$ facter --yaml > data.yaml
$ puppet epp render -e '<% $facts[osfamily] %>' --facts data.yaml
```

validate

Validate the template 'template.epp' in module 'mymodule':

```
$ puppet epp validate mymodule/template.epp
```

Validate two arbitrary template files:

```
$ puppet epp validate mymodule/template1.epp yourmodule/something.epp
```

Validate a template somewhere in the file system:

```
  $ puppet epp validate /tmp/testing/template1.epp
```

Validate a template against a file relative to the current directory:

```
 $ puppet epp validate template1.epp

 $ puppet epp validate ./template1.epp
```

Validate from STDIN:

```
$ cat template.epp | puppet epp validate
```

Continue on error to see errors for all templates:

```
$ puppet epp validate mymodule/template1.epp mymodule/template2.epp --continue_on_error
```

## COPYRIGHT AND LICENSE
Copyright 2014 by Puppet Inc., Vox Pupuli Apache 2 license; see COPYING


puppet-facts

title: puppet-facts(8)

summary: Retrieve and store facts\.

text:
# puppet-facts(8)

## NAME
puppet-facts - Retrieve and store facts.

## SYNOPSIS
puppet facts action [--terminus _TERMINUS]

## DESCRIPTION
This subcommand manages facts, which are collections of normalized system information used by OpenVox. It can read facts directly from the local system (with the default facter terminus).

## OPTIONS
Note that any setting that's valid in the configuration file is also a valid long argument, although it may or may not be relevant to the present action. For example, server and run_mode are valid settings, so you can specify --server <servername>, or --run_mode <runmode> as an argument.

See the configuration file documentation at https://puppet.com/docs/puppet/latest/configuration.html for the full list of acceptable parameters. A commented list of all configuration options can also be generated by running puppet with --genconfig.

--render-as FORMAT

The format in which to render output. The most common formats are json, s (string), yaml, and console, but other options such as dot are sometimes available.

--verbose

Whether to log verbosely.

--debug

Whether to log debug information.

--terminus _TERMINUS

Indirector faces expose indirected subsystems of Puppet. These subsystems are each able to retrieve and alter a specific type of data (with the familiar actions of find, search, save, and destroy) from an arbitrary number of pluggable backends. In Puppet parlance, these backends are called terminuses.

Almost all indirected subsystems have a rest terminus that interacts with the puppet master's data. Most of them have additional terminuses for various local data models, which are in turn used by the indirected subsystem on the puppet master whenever it receives a remote request.

The terminus for an action is often determined by context, but occasionally needs to be set explicitly. See the "Notes" section of this face's manpage for more details.

## ACTIONS
find - Retrieve a node's facts.

SYNOPSIS

puppet facts find [--terminus _TERMINUS] [node_certname]

DESCRIPTION

Retrieve a node's facts.

RETURNS

A hash containing some metadata and (under the "values" key) the set of facts for the requested node. When used from the Ruby API: A Puppet::Node::Facts object.

RENDERING ISSUES: Facts cannot currently be rendered as a string; use yaml or json.

NOTES

When using the facter terminus, the host argument is ignored.

info - Print the default terminus class for this face.

SYNOPSIS

puppet facts info [--terminus _TERMINUS]

DESCRIPTION

Prints the default terminus class for this subcommand. Note that different run modes may have different default termini; when in doubt, specify the run mode with the '--run_mode' option.

save - API only: create or overwrite an object.

SYNOPSIS

puppet facts save [--terminus _TERMINUS] key

DESCRIPTION

API only: create or overwrite an object. As the Faces framework does not currently accept data from STDIN, save actions cannot currently be invoked from the command line.

show - Retrieve current node's facts.

SYNOPSIS

puppet facts [--terminus _TERMINUS] [--config-file path] [--custom-dir path] [--external-dir path] [--no-block] [--no-cache] [--show-legacy] [--value-only] [--timing] [facts]

DESCRIPTION

Reads facts from the local system using facter terminus. A query can be provided to retrieve just a specific fact or a set of facts.

OPTIONS --config-file <path> - The location of the config file for Facter.

--custom-dir <path> - The path to a directory that contains custom facts.

--external-dir <path> - The path to a directory that contains external facts.

--no-block - Disable fact blocking mechanism.

--no-cache - Disable fact caching mechanism.

--show-legacy - Show legacy facts when querying all facts.

--timing - Show how much time it took to resolve each fact.

--value-only - Show only the value when the action is called with a single query

RETURNS

The output of facter with added puppet specific facts.

NOTES

upload - Upload local facts to the puppet master.

SYNOPSIS

puppet facts upload [--terminus _TERMINUS]

DESCRIPTION

Reads facts from the local system using the facter terminus, then saves the returned facts using the rest terminus.

RETURNS

Nothing.

NOTES

This action requires that the Puppet Server's auth.conf file allow PUT or save access to the /puppet/v3/facts API endpoint.

For details on configuring Puppet Server's auth.conf, see:

https://puppet.com/docs/puppetserver/latest/config_file_auth.html

## EXAMPLES
find

Get facts from the local system:

$ puppet facts find

show

retrieve facts:

$ puppet facts show os

upload

Upload facts:

$ puppet facts upload

## NOTES
This subcommand is an indirector face, which exposes find, search, save, and destroy actions for an indirected subsystem of Puppet. Valid termini for this face include:

- facter

- json

- memory

- network_device

- rest

- store_configs

- yaml

## COPYRIGHT AND LICENSE
Copyright 2011 by Puppet Inc., Vox Pupuli Apache 2 license; see COPYING