MySQL SSH Connection - Cipher (es-128-cbc)

Hello! So currently I am having an issue, here is all the information:

I have a managed Database provided via a cPanel server I have, I don’t have any kind of admin rights over this server, it’s fully managed.

I’ve used the database connected to n8n for almost one year now, but as the amount of executions grow I am facing some connection timeout issues with my database. Since I don’t have admin permissions and the provider refuses to up the max timeout time on the database… I figured I could try to link my DB connection with a SSH Tunnel, to reduce latency and packet loss and hopefully improve something… Now my problem…

The cpanel only allows me to create the SSH key with a passphrase and it encrypts it by default with:

Proc-Type: 4,ENCRYPTED DEK-Info: AES-128-CBC

This causes n8n to throw me this error “Cannot parse privateKey: Cipher (es-128-cbc) not supported for encrypted OpenSSH private key”

I’ve been searching but apart from getting my current SSH.pem and run example:

ssh-keygen -p -m PEM -f n8n.pem

I can’t figure how to make it work… This solution works but I would either need to host this on a small VPS (I really don’t want to) or leave whatever machine runs it always online…

Anyone knows any way around this?

Information on your n8n setup

  • n8n version: 1.118.1
  • Database (default: SQLite): MySQL
  • n8n EXECUTIONS_PROCESS setting (default: own, main): Main
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Cloud
  • Operating system: MacOS

The issue you’re experiencing is due to n8n not supporting the AES-128-CBC cipher used by your cPanel-generated SSH key. Based on the [community.n8n.io]( Unable to use SSH Credentials. Bug? ) discussion, this was a known limitation that has been addressed in newer versions.

Here are your options to resolve this:

• **Convert your existing key**: Use `ssh-keygen -p -m PEM -f your-key.pem` to convert your current key to a supported format, then use it in n8n

• **Generate a new OpenSSH format key**: If possible, create a new SSH key pair using `ssh-keygen -t rsa -b 4096` without specifying the old PEM format

• **Update n8n**: Ensure you’re running the latest version of n8n Cloud, as SSH key support has been improved significantly since the early issues reported in the community

If your cPanel provider only supports the problematic cipher format and you can’t convert the key successfully, you might need to contact your hosting provider to see if they can generate keys in a different format or consider using a different connection method for your database access.