Commit bebd9ab3 authored by Thomas Gambier's avatar Thomas Gambier 🚴🏼

stack/resilient: add timeout in sshd server and ssh client

parent 9f0b1c97
Pipeline #37247 failed with stage
in 0 seconds
......@@ -236,7 +236,12 @@ class Recipe(GenericSlapRecipe, Notify, Callback):
# Create the rdiff-backup wrapper
# It is useful to separate it from the notifier so that we can run it manually.
remote_schema = '{ssh} -o "ConnectTimeout 300" -p %s {username}@{hostname}'.format(
remote_schema = ('{ssh} '
'-o "ConnectTimeout 300" '
'-o "ServerAliveCountMax 10" '
'-o "ServerAliveInterval 30" '
'-p %s '
'{username}@{hostname}').format(
ssh=self.options['sshclient-binary'],
username=parsed_url.username,
hostname=parsed_url.hostname
......
......@@ -14,7 +14,7 @@
# not need these here).
[pbsready]
filename = pbsready.cfg.in
md5sum = e24d0567cda7c72e39f6c8fcb0ede7ab
md5sum = 5fec0e5f892aaf06beb814e24e514cae
[pbsready-import]
filename = pbsready-import.cfg.in
......
......@@ -172,7 +172,6 @@ config-command = $${notifier-stalled-promise-bin:wrapper-path}
#--
#-- OpenSSH.
[resilient-sshd-config]
# XXX: Add timeout support
recipe = slapos.recipe.template
output = $${directory:etc}/resilient-sshd.conf
path_pid = $${directory:run}/resilient-sshd.pid
......@@ -186,6 +185,8 @@ inline =
PasswordAuthentication no
PubkeyAuthentication yes
ForceCommand $${rdiff-backup-server:wrapper}
ClientAliveInterval 30
ClientAliveCountMax 10
[sshd-raw-server]
recipe = slapos.cookbook:wrapper
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment