You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ISSUE
On Ubuntu 24.04, when starting a new Semaphore installation (binary install) it seems that the host's StrictHostKeyChecking setting (which is enabled by default) is preventing any new host keys from getting added to the known_hosts repository. The Strict Host Key Checking feature forces the user to confirm the addition of a host key to the known_hosts repository.
However, obviously Semaphore runs SSH in a non-interactive manner and thus a confirmation will never come, resulting in a stuck task run:
... will halt the task execution because SSH is awaiting for confirmation to add the host key to its repository due to strict host key checking.
On the target host side, stopping the task template run will result in a [preauth] disconnect message, confirming this behavior.
WORK-AROUND
A work-around for this show stopper is to force SSH to accept fingerprints by editing /etc/ssh/ssh_config and setting StrictHostKeyChecking no to disable strict host key checking system-wide. When I changed this on my system, all went well and new host keys would be accepted without a problem.
PROPOSED SOLUTION
However, a better solution is for Semaphore to run a proper SSH command and add the -o StrictHostKeyChecking=accept-new option. This would accept a new host key without having to change the underlying system settings.
Impact
Service (scheduled tasks, alerts), Ansible (task execution)
### Logs & errors
_No response_
### Manual installation - system information
Linux HOSTNAME 6.8.0-1017-azure #20-Ubuntu SMP Tue Oct 22 03:43:13 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
### Configuration
_No response_
### Additional information
_No response_
The text was updated successfully, but these errors were encountered:
northwestnodes-eric
changed the title
Problem: SSH's StrictHostKeyChecking is blocking successful SSH connections
Problem: SSH's StrictHostKeyChecking is blocking SSH connections and task runs
Nov 8, 2024
Issue
ISSUE
On Ubuntu 24.04, when starting a new Semaphore installation (binary install) it seems that the host's
StrictHostKeyChecking
setting (which is enabled by default) is preventing any new host keys from getting added to the known_hosts repository. The Strict Host Key Checking feature forces the user to confirm the addition of a host key to the known_hosts repository.However, obviously Semaphore runs SSH in a non-interactive manner and thus a confirmation will never come, resulting in a stuck task run:
... will halt the task execution because SSH is awaiting for confirmation to add the host key to its repository due to strict host key checking.
On the target host side, stopping the task template run will result in a [preauth] disconnect message, confirming this behavior.
WORK-AROUND
A work-around for this show stopper is to force SSH to accept fingerprints by editing
/etc/ssh/ssh_config
and settingStrictHostKeyChecking no
to disable strict host key checking system-wide. When I changed this on my system, all went well and new host keys would be accepted without a problem.PROPOSED SOLUTION
However, a better solution is for Semaphore to run a proper SSH command and add the
-o StrictHostKeyChecking=accept-new
option. This would accept a new host key without having to change the underlying system settings.Impact
Service (scheduled tasks, alerts), Ansible (task execution)
Installation method
Binary
Database
Postgres
Browser
Chrome
Semaphore Version
2.10.35-a71a3c5-1730103563
Ansible Version
Linux HOSTNAME 6.8.0-1017-azure #20-Ubuntu SMP Tue Oct 22 03:43:13 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
The text was updated successfully, but these errors were encountered: