mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-05-19 16:31:30 +00:00
Merge pull request #806 from linuztx/ssh-disable-osc
Disable systemd OSC metadata in SSH session
This commit is contained in:
commit
3d61822153
1 changed files with 2 additions and 1 deletions
|
|
@ -62,7 +62,8 @@ class SSHInteractiveSession:
|
|||
# invoke interactive shell
|
||||
self.shell = self.client.invoke_shell(width=100, height=50)
|
||||
|
||||
initial_command = "stty -echo"
|
||||
# disable systemd/OSC prompt metadata and disable local echo
|
||||
initial_command = "unset PROMPT_COMMAND PS0; stty -echo"
|
||||
if self.cwd:
|
||||
initial_command = f"cd {self.cwd}; {initial_command}"
|
||||
self.shell.send(f"{initial_command}\n".encode())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue