ssh-server-g3 — Secure Shell server - Generation 3
-l, --listen= [
PORT ] [
no ] ] [
-V, --version] [
ssh-server-g3 is the Secure Shell server program for SSH Tectia Server.
The ssh-server-g3 command should not be used directly, except for debugging purposes. Use instead the startup script with the same name, ssh-server-g3.
The path to the ssh-server-g3 startup script is different on each operating system:
# /opt/tectia/sbin/rc.ssh-server-g3 [command]
On Linux and Solaris:
# /etc/init.d/ssh-server-g3 [command]
# /sbin/init.d/ssh-server-g3 [command]
On Windows, use the SSH Tectia Server Configuration GUI to stop and start the server process.
In the command-line startup scripts, the
command can be either start, stop, restart, or reload:
Start the server.
Stop the server. Existing connections stay open until closed from the client side.
Start a new server process. Existing connections stay open using the old server process. The old process is closed after the last old connection is closed from the client side.
Reload the configuration file. Existing connections stay open.
When the ssh-server-g3 command is used directly, it accepts the following options:
Sets the debug level string to
Reads the SSH Tectia Server configuration file from
FILEinstead of the default location.
Specifies the host key file to be used.
Specifies the listen address and port. If
ADDRESSis unspecified, listen on any IP address.
Sets the initial number of Servant processes.
Sets the path to the plugin directory.
Sets the path to the auxiliary data directory.
Sets the path to the
Sets a list of allowed ciphers.
Sets a list of allowed MACs.
When set to
yes, uses the FIPS mode for the cryptographic library. When set to
no, uses the standard mode for the cryptographic library. If the option is given without the
yesis assumed. If the option is not given at all on the command line, the mode specified in the
ssh-server-config.xmlfile is used (by default, the standard mode).
Displays program version and exits.
Displays a short summary of command-line options and exits.
When a user logs in successfully, ssh-server-g3 does the following:
Changes process to run with normal user privileges.
Sets up the basic environment.
(On Solaris) Reads
/etc/default/login, if it exists.
(On Unix) Reads
/etc/environment, if it exists.
(On Unix) Reads
<user-config-dir>/environment, if it exists.
Changes to the user's home directory.
Runs the user's shell, or the specified command or subsystem.
Upon connection, SSH Tectia Server will automatically set a number of environment variables that can be used by Secure Shell clients. The clients can also set or change the value of the environment variables if allowed by the server configuration (
ssh-server-config.xml). The following variables are set by ssh-server-g3:
DISPLAYvariable indicates the location of the X11 server. It is automatically set by the server to point to a value of the form
hostnameindicates the host on which the server and the shell are running, and
nis an integer greater or equal than 1. Secure Shell clients use this special value to forward X11 connections over the secure channel.
The user's home directory.
USER; set for compatibility with systems using this variable.
The user's mailbox.
Set to the default PATH, depending on the operating system or, on some systems,
The address of the SOCKS server used by the client.
If this exists, it is used to indicate the path of a Unix-domain socket used to communicate with the authentication agent (or its local representative).
Identifies the client end of the connection. The variable contains three space-separated values: client IP address, client port number, and server port number.
This will be the original command given to the Secure Shell client if a forced command is run. It can be used, for example, to fetch arguments from the other end. This does not have to be a real command, it can be the name of a file, device, parameters or anything else.
This is set to the name of the tty (path to the device) associated with the current shell or command. If the current session has no tty, this variable is not set.
The terminal type of the Secure Shell client.
The time-zone variable is set to indicate the present time zone if it was set when the server was started (the server passes the value to new connections).
The name of the user.
ssh-server-g3 uses the following files:
This is the ssh-server-g3 configuration file. The format of this file is described in ssh-server-config(5).
On Windows, the configuration file is located in "
C:\Program Files\SSH Communications Security\SSH Tectia\SSH Tectia Server\ssh-server-config.xml".
These files are the default host key pair used by SSH Tectia Server for authenticating itself to the clients. A 1536-bit RSA key pair is automatically generated during the installation. It consists of the private key (
hostkey) and the public key (
On Windows, the default host key pair is located in "
C:\Program Files\SSH Communications Security\SSH Tectia\SSH Tectia Server\hostkey[.pub]".
This file is used for seeding the random number generator. This file is created the first time the program is run and it is updated automatically. You should never need to read or modify this file.
On Windows, the random seed file is located in "
C:\Program Files\SSH Communications Security\SSH Tectia\SSH Tectia Server\random_seed".
This directory is for storing the client host public keys that are trusted for host-based authentication.
The public-key files should be named according to the following pattern:
In the key name,
<hostname>is the hostname the client is sending to the server and
<keytype>is the type of the public key (either
ssh-rsa). For example, a key called
client.example.com.ssh-dss.pubis a DSS key that is trusted for login from the host
On Windows, the trusted host key directory is located in "
C:\Program Files\SSH Communications Security\SSH Tectia\SSH Tectia Server\trusted_hosts".
For more information, see Host-Based User Authentication.
This directory is the default location used for the user public keys that are authorized for login.
On Windows, the default directory for user public keys is
This is the default file that lists the user public keys that are authorized for login.
Using the authorization file is optional. If the file does not exist, SSH Tectia Server looks for authorized keys in the
The authorization file contains a list of public key filenames each preceded by the keyword
Key. If there is more than one
Key, they are all authorized for login. An example file is shown below:
This directs SSH Tectia Server to use
$HOME/.ssh2/mykey.pubas a valid public key when authorizing login.
The files are by default assumed to be in the
$HOME/.ssh2directory, but also a path to the key file can be given. The path can be absolute or relative to the
$HOME/.ssh2directory. The directory path can also contain a pattern string that is expanded by SSH Tectia Server.
The following pattern strings can be used:
%Dis the user's home directory
%Uis the user's login name; expands to
domain.userwith Windows domain users.
%IUis the user's user ID (uid); not supported on Windows
%IGis the user's group ID (gid); not supported on Windows
Examples of allowed key paths are shown below:
Key authorized_keys/key1.pub Key /tmp/key2.pub Key /usr/%U/key3.pub
Optionally, additional parameters can be specified for the keys by using the
Optionskeyword. This keyword, if used, must follow the
Keykeyword above. The various options are specified as a comma-separated list. See the section called “Authorization File Options” for more information.
On Windows, the default authorization file is located in
%USERPROFILE%\.ssh2\authorization. Key paths in the file can be absolute or relative to the
This is the default file used by OpenSSH server that contains the user public keys that are authorized for login. It is supported also by SSH Tectia Server from version 5.1 onwards. The location of the file must be defined in the
ssh-server-config.xmlfile by using the
openssh-authorized-keys-fileattribute. See auth-publickey.
The file contains public keys, one on each row, and options. The format of each row is the following:
options keytype base64-encoded-key comment
SSH Tectia Server supports all OpenSSH-style
authorized_keysfile options, except
For more information on the format of this file, see the OpenSSH sshd(8) man page.
Authorization File Options
On the first line of the authorization file, you can optionally specify the regular expression syntax that is used when parsing hostname patterns in the
deny-from options (see below). The format of the first line is the following:
## REGEX-SYNTAX egrep
The value for the syntax can be
traditional. The values are not case-sensitive.
traditional are synonymous.
Options can be specified in the
authorization file as a comma-separated list. SSH Tectia Server 5.3 supports the following options:
In addition to public-key authentication, the canonical name of the remote host must match the given pattern(s). Specify one pattern per keyword; multiple keywords can be used. See the example below.
This is used to specify a "forced command" that will be executed on the server side instead of anything else when the user is authenticated. The command supplied by the user (if any) is put in the environment variable
SSH2_ORIGINAL_COMMAND. The command is run on a pty if the connection requests a pty; otherwise it is run without a tty. Quotes may be used in the command if escaped with backslashes.
This option is useful for restricting certain public keys to perform just a specific operation. An example might be a key that permits remote backups but nothing else. Notice that the client may specify TCP/IP and/or X11 forwarding, unless they are explicitly denied (see
If terminal is explicitly allowed in the
ssh-server-config.xmlfile, the forced command is run only when the user tries to run remote commands. If the user requests a shell, he can get it normally and the forced command is not run.
If a forced command is defined in the
ssh-server-config.xmlfile, it overrides any commands in the authorization files. The configuration file might also allow only specific commands, or deny all remote commands. These restrictions apply also to commands in the authorization file.
For more information on command restrictions in the configuration file, see command.
This option 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.
This option sets idle timeout limit to time either in seconds (
sor nothing after the number), in minutes (
m), in hours (
h), in days (
d), or in weeks (
w). If the connection has been idle (all channels) this long, the connection is closed.
This option forbids TCP/IP forwarding when this key is used for authentication. Any port forward (tunneling) requests by the client will return an error. This is useful in combination with the
This option forbids X11 forwarding when this key is used for authentication. Any X11 forward requests by the client will return an error.
This option forbids authentication agent forwarding when this key is used for authentication.
This option prevents tty allocation (a request to allocate a pty will fail).
An example of an authorization file is shown below:
## REGEX-SYNTAX egrep # First key: login allowed only from the specified hosts Key key1.pub Options allow-from=".*\.example\.org", deny-from="pc\.example\.org" # Second key: forced command for doing a backup of the disk drive Key key2.pub Options command="dd if=/dev/hda", no-port-forwarding, no-x11-forwarding