You are viewing limited content. For full access, please sign in.

Question

Posted to Laserfiche Cloud

Question

Remote Agent and on-premises database over SSH

asked on February 16, 2021

Hello,

I have an interesting challenge where I need to use a remote worker on a Windows PC to connect to a Linux server hosting a MySQL database using SSH. Unfortunately it seems the MySQL Direct connection does not (yet) support TCP/IP over SSH. 

When I create the Data Source for the DB connection it is only possible to enter one set of authentication information (server/port, DB, username / password).  I would need to enter two sets of authentication information (SSH then SQL) similarly to how MySQL Workbench connection dialog asks.

 Photos are screenshots of MySQL Workbench followed by Laserfiche Cloud Data Source.

Does anyone have any thoughts about how I can overcome this challenge?

I realize that I could use lookup tables in cloud but I wanted to run bon-a-fide DB query to retrieve and update information as part of a proof-of-concept demonstration. 

 

Thank you,

 

Justin

0 0

Replies

replied on March 2, 2021

I believe I have found a solution to this issue.  Rather than using a data source I have chosen to have the remote agent execute a script rule.  I have written a python script to create an SSH tunnel and run the query.  The script rule will supply the parameter to the script and parse the return from the script.

My script works when executed from command line however when the remote agent executes the script I receive an error "Object reference not set to an instance of an object".  I am working with support and as soon as this issue is resolved then I will post my script on this forum along with any relevant updates to assist other users in the future.

Stay tuned!!

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.