Précisons la clé

This commit is contained in:
Iwan Clément
2019-05-03 17:34:49 +02:00
parent 0eb04c6278
commit 150bf4bee8
2 changed files with 2 additions and 1 deletions

View File

@@ -21,6 +21,7 @@
- template: jinja - template: jinja
- defaults: - defaults:
ANS_ADDR_TARGET: {{ANS_ADDR_TARGET}} ANS_ADDR_TARGET: {{ANS_ADDR_TARGET}}
KEY_NAME: {{KEY_NAME}}
'secure_tunnel_default_file': 'secure_tunnel_default_file':
file.managed: file.managed:

View File

@@ -6,7 +6,7 @@ After=network.target
[Service] [Service]
User=${ANS_REMOTE_USER} User=${ANS_REMOTE_USER}
EnvironmentFile=/etc/default/secure-tunnel EnvironmentFile=/etc/default/secure-tunnel
ExecStart=/usr/bin/ssh -p ${REMOTE_PORT} -NT -o StrictHostKeyChecking=no -o ServerAliveInterval=60 -o ExitOnForwardFailure=yes -R ${RTARGET_PORT}:localhost:22 ${ANS_TARGET_USER}@${TARGET} ExecStart=/usr/bin/ssh -p ${REMOTE_PORT} -NT -i $HOME/.ssh/{{KEY_NAME}} -o StrictHostKeyChecking=no -o ServerAliveInterval=60 -o ExitOnForwardFailure=yes -R ${RTARGET_PORT}:localhost:22 ${ANS_TARGET_USER}@${TARGET}
# Restart every >2 seconds to avoid StartLimitInterval failure # Restart every >2 seconds to avoid StartLimitInterval failure
RestartSec=5 RestartSec=5