Difference between revisions of "Linux: Setting up a call home function"
Jump to navigation
Jump to search
| Line 9: | Line 9: | ||
[Service] | [Service] | ||
Type=idle | Type=idle | ||
| − | ExecStart=/usr/bin/ssh -o "ServerAliveInterval 30" -o "ServerAliveCountMax 3" -o "ExitOnForwardFailure=yes" -N -R | + | ExecStart=/usr/bin/ssh -o "ServerAliveInterval 30" -o "ServerAliveCountMax 3" -o "ExitOnForwardFailure=yes" -N -R 2233:localhost:22 rsupport@jumpbox.define-technology.com |
ExecReload=/bin/kill -HUP $MAINPID | ExecReload=/bin/kill -HUP $MAINPID | ||
KillMode=process | KillMode=process | ||
Revision as of 22:18, 8 March 2021
File: /etc/systemd/system/callhome.service # Mode 644.
[Unit]
Description=callhome
Documentation=man:ssh
After=network-online.target
[Service]
Type=idle
ExecStart=/usr/bin/ssh -o "ServerAliveInterval 30" -o "ServerAliveCountMax 3" -o "ExitOnForwardFailure=yes" -N -R 2233:localhost:22 rsupport@jumpbox.define-technology.com
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Restart=on-failure
RestartSec=57s
[Install]
WantedBy=multi-user.targetStart and enable the service on reboot
systemctl daemon-reload
systemctl enable callhome
systemctl start callhome