SSH
Last updated
Was this helpful?
Last updated
Was this helpful?
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.
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.
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 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
.
For key-based authentication, you must generate a key for UI Bakery to connect to your host server. You can use the following command:
You can enter a passphrase for the key or leave it empty.
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:
On the Data sources page, click Connect, and select SSH in the Data sources list.
Fill in the SSH connection credentials based on your server authentication configuration.
Click Test connection to check whether the data source can be connected, and then click Connect Datasource to complete the setup.
Your key must be in the PEM format, which means that it should include the -----BEGIN EC PRIVATE KEY-----
and -----END EC PRIVATE KEY-----
lines.
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 action step.