Fix SSH auth: respect ~/.ssh/config instead of defaulting to root

CoulombCore (92.205.130.254) authenticates as tegwick via id_ops in
ssh config, not root. Omit SANDBOXER_SSH_USER to let OpenSSH apply config;
set SANDBOXER_SSH_USER only to override.
This commit is contained in:
2026-06-23 14:16:16 +02:00
parent 8a39eaba34
commit 939c4e1aff
5 changed files with 36 additions and 12 deletions

13
tests/test_ssh.py Normal file
View File

@@ -0,0 +1,13 @@
"""SSH config behavior."""
from sandboxer.extensions.ssh import SSHConfig
def test_destination_uses_ssh_config_when_user_unset() -> None:
ssh = SSHConfig(host="92.205.130.254")
assert ssh.destination == "92.205.130.254"
def test_destination_includes_explicit_user() -> None:
ssh = SSHConfig(host="92.205.130.254", user="tegwick")
assert ssh.destination == "tegwick@92.205.130.254"