Hello All,
On Debian 11, for the first time, I want to establish a permanent postgresql connection between 2 servers via an ssh tunnel.
My CLI command works.
My service is running but my journal shows a 'failed' state, so I can't connect , the local port isn't open.
Thanks in advance for any help.
For information
my service:
/etc/systemd/system/ssh-tunnel3.service
systemctl status ssh-tunnel3journalctl -u ssh-tunnel3
On Debian 11, for the first time, I want to establish a permanent postgresql connection between 2 servers via an ssh tunnel.
My CLI command works.
My service is running but my journal shows a 'failed' state, so I can't connect , the local port isn't open.
Thanks in advance for any help.
For information
my service:
/etc/systemd/system/ssh-tunnel3.service
Code:
[Unit]Description=ssh tunnelWants=network.targetAfter=network.targetStartLimitIntervalSec=5StartLimitBurst=1[Service]Type=simple# ExecStart=/usr/bin/ssh admin@xxxxx.yy -4 -N -L 35432:localhost:5432ExecStart=/usr/bin/ssh admin@xx.xx.xx.xx -4 -N -L 35432:127.0.0.1:5432ExecStop=/usr/bin/ssh arh -O exit -R 35432:localhost:5432TimeoutStartSec=10TimeoutStopSec=10Restart=alwaysRestartSec=10 StandardOutput=journal+console[Install]WantedBy=multi-user.target
systemctl status ssh-tunnel3
Code:
● ssh-tunnel3.service - ssh tunnelLoaded: loaded (/etc/systemd/system/ssh-tunnel3.service; enabled; vendor preset: enabled)Active: active (running) since Mon 2024-04-08 08:14:53 CEST; 1min 59s agoMain PID: 1991402 (ssh)Tasks: 1 (limit: 9394)Memory: 988.0KCGroup: /system.slice/ssh-tunnel3.service└─1991402 /usr/bin/ssh admin@xxxxx.yy -4 -N -L 35432:localhost:5432
Code:
The unit ssh-tunnel3.service has entered the ‹ failed › state with result ‹ exit-code ›
Statistics: Posted by pmgs — 2024-04-08 10:18