Connect to Postgres DB via SSH Tunnel

Hello Guys,
Iam trying to connect to a Postgres DB which is located on a different host then the n8n instance. So I need to connect to this db via SSH Tunnel.

How is this scenario possible with n8n @jan?

Thank you in advance and stay safe!

Hi, use the node execute command and the connect via ssh

1 Like

It doesn’t let SSH tunnel to be established and parsing psql output as a text is quite a complex and error prone approach.

Ideally it would be nice to expand ssh node to establish ssh tunnels, opening an access to other nodes / commands to work with the remote machine.

2 Likes