|
@@ -223,11 +223,15 @@ class TunnelService:
|
|
|
|
|
|
|
|
# Spawn ttyd process
|
|
# Spawn ttyd process
|
|
|
# ttyd connects to device via SSH through the tunnel port
|
|
# ttyd connects to device via SSH through the tunnel port
|
|
|
|
|
+ # Uses dedicated key for device access
|
|
|
|
|
+ import os
|
|
|
|
|
+ ssh_key = os.path.expanduser("~/.ssh/device_access")
|
|
|
cmd = [
|
|
cmd = [
|
|
|
"ttyd",
|
|
"ttyd",
|
|
|
"--port", str(ttyd_port),
|
|
"--port", str(ttyd_port),
|
|
|
"--writable", # Allow input
|
|
"--writable", # Allow input
|
|
|
"ssh",
|
|
"ssh",
|
|
|
|
|
+ "-i", ssh_key,
|
|
|
"-p", str(device_tunnel_port),
|
|
"-p", str(device_tunnel_port),
|
|
|
"-o", "StrictHostKeyChecking=no",
|
|
"-o", "StrictHostKeyChecking=no",
|
|
|
"-o", "UserKnownHostsFile=/dev/null",
|
|
"-o", "UserKnownHostsFile=/dev/null",
|