ssh: disable systemd OSC metadata
linuztx committed
Nov 14, 2025 at 22:43 UTC
201eff0b9e71b118c9aaa861ced50a6f6e68045f
1 file changed
+2
-1
python/helpers/shell_ssh.py
+2
-1
@@ -62,7 +62,8 @@ class SSHInteractiveSession:
62
# invoke interactive shell
63
self.shell = self.client.invoke_shell(width=100, height=50)
64
65
- initial_command = "stty -echo"
65
+ # disable systemd/OSC prompt metadata and disable local echo
66
+ initial_command = "unset PROMPT_COMMAND PS0; stty -echo"
67
if self.cwd:
68
initial_command = f"cd {self.cwd}; {initial_command}"
69
self.shell.send(f"{initial_command}\n".encode())