#Failed to create SSH connection. Please check your datasource configuration

1 messages · Page 1 of 1 (latest)

indigo knoll
#

I'm trying to connect to a MySQL database through an SSH tunnel on Appsmith Cloud, but no matter what I try I get a not-super-helpful "Failed to create SSH connection" error.
Is there any way to see why the connection failed?

I already triple-checked credentials, addresses and firewalls, but nothing seems to work. Creating a connection from my own terminal with the exact same settings works flawlessly :(

prime mortarBOT
#

Hello! I'm AppySmithy, your support bot for all things Appsmith. Let's tackle
the problem together! Since you've already checked credentials, addresses, and
firewalls and the connection works in your terminal, we might be dealing with an
issue specific to Appsmith Cloud. Here's what you can do to further troubleshoot
your SSH tunnel connection issue: 1. Double-check if the SSH port you're using
is allowed in Appsmith Cloud. Appsmith typically uses port 22 for SSH, so make
sure this port is accessible. 2. If you're using a private key for SSH
authentication, ensure it is in the correct format (e.g., PEM) and added
properly to Appsmith. 3. Verify if any IP whitelisting is required and if
Appsmith's Cloud IP ranges are allowed through. 4. Confirm that you don't have
any restrictions in place on your MySQL user permissions that could prevent
access from external services like Appsmith. 5. Look for logs on your SSH server
to see if there is any indication of a connection attempt from Appsmith and
possible reasons for failure. Appsmith does not provide direct access to logs
for SSH connections on the cloud platform, so the error messaging can be
limited. If you continue having issues, you would need additional support. Would
you like me to connect you to a human agent? If you don't find my response
helpful, you can request to speak to a human agent

indigo knoll
#

Got it, my key file was not in PEM format.
For the humans: your bot is abolutely incredible, but it would be even better to mention this in the documentation, or even try to auto-detect it on the frontend :)

prime mortarBOT
#

I'm glad to hear that you identified the issue with the key file format. Your
feedback on improving the documentation and possibly including auto-detection on
the frontend is much appreciated. I will relay your suggestion to the team for
consideration in future updates. If you require further assistance or have any
more questions, please feel free to ask. I'm here to help you succeed with
Appsmith! If you don't find my response helpful, you can request to speak to a
human agent

indigo knoll
#

Using a key with a passphrase gets the same error, it'd be nice if this was also documented and/or auto-detected

prime mortarBOT
#

Thank you for bringing this up. Using an SSH key with a passphrase may indeed
result in a connection failure if the passphrase input is not provided or
handled correctly in the Appsmith setup. This is an important detail that should
be covered in the documentation to guide users more effectively. As of now, for
Appsmith Cloud, you should ensure that when you're using an SSH key with a
passphrase: - The passphrase is entered correctly in the SSH configuration
settings within Appsmith. - The format of the SSH key, even with the passphrase,
should be supported (PEM format). You may need to convert your SSH key to a
passphrase-less key temporarily to establish the connection, or if possible, use
an SSH key without a passphrase for this purpose. I'll take note of your
feedback on documenting this better, as well as considering an auto-detection
feature. If you're still facing issues or need further clarification, please let
me know, and I can connect you with a human for additional support. If you don't
find my response helpful, you can request to speak to a human agent

indigo knoll
#

There is currently no way to set a passphrase in the SSH configuration

prime mortarBOT
#

My apologies for the oversight. If Appsmith doesn't currently support entering
an SSH key passphrase through its Cloud interface, then you'll need to use an
SSH key without a passphrase for the connection to work. Here's what you can do:

  • If possible, generate a new SSH key without a passphrase specifically for use
    with Appsmith. - If you need to continue using the existing SSH key with a
    passphrase, you could remove the passphrase temporarily. Please note that this
    decreases security, so do it with caution and consider the security implications
    for your environment. Thank you for pointing this out. This indeed seems like an
    important feature that could be added to Appsmith in the future, and I will
    relay your feedback to the appropriate team. Meanwhile, if there's anything else
    that you need help with, let me know! If you don't find my response helpful, you
    can request to speak to a human agent