SSH

The SSH data source in UI Bakery allows you to securely connect to remote servers and retrieve data for use in your UI Bakery applications. With this data source, you can seamlessly integrate data from various SSH-enabled sources, such as Linux servers, cloud instances, or network-attached storage (NAS) systems.

Configuration

Prerequisites

Before connecting your data source, you first need to connect to an SSH server. We'll be using a Linux-based server as an example.

Host server configuration

On your host server, you need to make sure that:

  • The sshd service is started and port 22 is open for inbound connections.

  • The server is accepting inbound connections from the UI Bakery instance. If it's not possible to connect to the server from the UI Bakery instance, it's still possible to connect to it through the SSH tunnel and Bastion host.

  • We recommend creating an additional user with restricted permissions for SSH connections.

  • You might also want to disable password authentication by editing the /etc/ssh/sshd_config file and adding the PasswordAuthentication no instruction. Afterwards, you will need to restart the sshd service, for instance, sudo service sshd restart.

Generate a key for ssh

For key-based authentication, you must generate a key for UI Bakery to connect to your host server. You can use the following command:

ssh-keygen -t ecdsa -m PEM -f ./private_key.pem

You can enter a passphrase for the key or leave it empty.

Add the key to your server's authorized keys list

In order to allow UI Bakery to connect to your Host machine as a specific user, you should login as that user and add your public key to the list of authorized keys. Usually, you will need to modify the ~/.ssh/authorized_keys file and add your public key as a separate line there.

If you've generated the ssh key using the command in the section above, you can get your public key using the following command:

ssh-keygen -y -f ./private_key.pem

Connecting the data source

  1. On the Data sources page, click Connect, and select SSH in the Data sources list.

  2. Fill in the SSH connection credentials based on your server authentication configuration.

  3. Click Test connection to check whether the data source can be connected, and then click Connect Datasource to complete the setup.

Usage

Once you've established the connection between UI Bakery and SSH, you can start interacting with its data. For this purpose, you can use the SSH Command action step.

Last updated

Was this helpful?