SSH

Configuring Tectia Server for Automated Secure File Transfer

Opening Tectia Server Configuration GUI
Enabling Public-Key Authentication
Settings for the Admin Group
Settings for the SFTP-users Group
Settings for the Rest of Users

Tectia Server can be used for automated secure file transfer. This use case shows how to configure Tectia Server for it. Tectia Client does not require any configuration changes.

The goal of changing the Tectia Server configuration is to improve the security of the system for automated file transfers. This requires some user restrictions on the SFTP usage. In this use case, the following restrictions are defined on Tectia Server:

  1. Public keys are the only allowed authentication method. See instructions in Enabling Public-Key Authentication.

  2. SFTP service is allowed only for specially created user groups SFTP-users and admin. SFTP service is denied from all other users. See instructions in Settings for the Admin Group, Settings for the SFTP-users Group and Settings for the Rest of Users.

  3. Members of SFTP-users have access to their user-specific home folders only. This can be defined with virtual folders. See instructions in Settings for the SFTP-users Group and Figure 5.14.

  4. Terminal access is allowed only for administrators; from everyone else, it is denied. See instructions in Settings for the Admin Group and Settings for the Rest of Users.

Opening Tectia Server Configuration GUI

On Windows, Tectia Server is configured through a graphical user interface.

Open the Tectia Server Configuration GUI by clicking Start → (All) Programs → Tectia Server → Tectia Server Configuration.

To access the necessary Tectia Server configuration settings, enable the advanced settings by clicking Advanced under GUI Mode on the Tectia Server view:

Enable Advanced GUI Mode

Figure 5.2. Enable Advanced GUI Mode


Now proceed to the actual configuration settings. See the example views below.

Enabling Public-Key Authentication

Define public-key authentication as the only allowed authentication method under the Authentication - Default-Authentication page, on the Parameters tab.

Enable only public-key authentication

Figure 5.3. Enable only public-key authentication


Settings for the Admin Group

Create a user group with administrator rights and allow all actions and services for the members of the group.

  1. Under the Services page, click Add to create a group for administrators.

    Start creating a user group

    Figure 5.4. Start creating a user group


    Tectia Server will use a placeholder name group1 for a newly created group.

  2. On the Basic tab, name the group admin and choose Allow or Allow all for all services, Terminal, Commands, Local Tunnels, and Remote Tunnels.

    Name the group 'admin' and allow all services

    Figure 5.5. Name the group 'admin' and allow all services


  3. Go to the Selectors tab, and click Add Selector. On the Add Selector tab, choose selector type Administrator, and click OK.

    Define the group selector as administrator

    Figure 5.6. Define the group selector as administrator


  4. When the Administrator Selector view opens, select Is Administrator, and click OK.

    Define user group as administrator group

    Figure 5.7. Define user group as administrator group


  5. On the SFTP tab, allow the SFTP service for the admin group, and keep the default settings.

    Allow SFTP for the group 'admin'

    Figure 5.8. Allow SFTP for the group 'admin'


Settings for the SFTP-users Group

Create a dedicated user group for secure file transfer users. An existing operating-system-related user group is attached to the Tectia SFTP group, and they are allowed access only to their user-specific home folders.

  1. Under the Services page, click Add to create a group for SFTP users.

    Start creating the SFTP user group

    Figure 5.9. Start creating the SFTP user group


  2. On the Basic tab, name the group SFTP-users and choose Deny or Deny all for all the listed services, Terminal, Commands, Local Tunnels, and Remote Tunnels. For more information on restricting terminal access, see Settings for the Rest of Users.

    Name the group 'SFTP-users' and deny all services

    Figure 5.10. Name the group 'SFTP-users' and deny all services


  3. On the Selectors tab, click Add Selector and choose the selector type User Group, and click OK.

    Define the group selector as user group

    Figure 5.11. Define the group selector as user group


  4. When the User Group Selector view opens, attach the relevant existing operating-system-related user group (named staff in this example) to the group.

    Attach user group 'staff'

    Figure 5.12. Attach user group 'staff'


    Data on the newly created group selectors appears on the Selectors tab.

  5. On the SFTP tab, allow the SFTP service for the SFTP-users and define the User Home Directory for the user group. This is the SFTP starting directory. Use the default %USERPROFILES%, as shown in the following figure.

    Allow SFTP service for group SFTP-users

    Figure 5.13. Allow SFTP service for group SFTP-users


  6. To define Virtual Folders for the user group, first clear the Use defaults check box on the SFTP tab. Then select C: from the Virtual Folder list and click the Edit button. When the SFTP Virtual Folder dialog opens, define the virtual folder as C:, and its destination as the user-specific subdirectory under the SFTP directory on the C: drive (when users change directory to C:, they are actually directed to their user-specific SFTP directory). The session starts in the user's home directory. No other directory can be accessed via SFTP.

    Define virtual folders for group SFTP-users

    Figure 5.14. Define virtual folders for group SFTP-users


    By default, file access by the user using the SFTP subsystem is restricted by the file system access controls. You can define more restrictions by defining virtual folders on Windows.

    By default, if no virtual folders are explicitly defined in the configuration, the user can access all drives via SFTP and SCP operations, the user's SFTP session starts in the C:\SFTP\%username% directory, and that is the target directory for SCP operations.

    When any virtual folders are defined, the user access is limited to the specified folders only. Note that the user's home directory must be under one of the defined virtual folders.

    [Note]Note

    The virtual SFTP root directory is not an actual directory on disk and no files can be written there.

    The value of virtual folder can contain the same special strings as the value of home (%username%, %username-without-domain%, %homedir%, and %hostname%).

Settings for the Rest of Users

The default service settings are applied to all users who do not belong to the admin group or the SFTP group. Deny all services from them on the Basic and SFTP tabs.

All services denied from default groups

Figure 5.15. All services denied from default groups


SFTP service denied from default groups

Figure 5.16. SFTP service denied from default groups


Notice that denying the terminal service, denies also X11 and agent forwarding and shell commands for the specified group (unless some commands are explicitly allowed).