mirror of
https://github.com/saphid/frame-control.git
synced 2026-10-06 06:00:33 +02:00
Devices: make the pin folder before ssh saves a first-seen key into it
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
cb182dbce5
commit
318bc3b84f
2 files changed
+5
-1
No files matched your search
+4
-1
@@ -666,8 +666,11 @@ class Link:
|
||||
extra = ["-o", "StrictHostKeyChecking=yes"]
|
||||
else:
|
||||
# First connection since this headset was added: trust what it shows
|
||||
# (as Set Up Connection does), and pin it from now on.
|
||||
# (as Set Up Connection does), and pin it from now on. ssh won't create
|
||||
# the folder its known_hosts file goes in.
|
||||
extra = ["-o", "StrictHostKeyChecking=accept-new"]
|
||||
pins = frame_devices.known_hosts(device["id"]).parent
|
||||
pins.mkdir(**({} if frame_host.WINDOWS else {"mode": 0o700}), parents=True, exist_ok=True)
|
||||
if self.control:
|
||||
# No ConnectTimeout: with it, OpenSSH's master takes ~5s to open its socket.
|
||||
argv = [*self.mux_base, *opts, *extra, "-v", "-o", "ControlMaster=yes", "-o", "ServerAliveInterval=5",
|
||||
|
||||
Reference in new issue
Block a user