Skip to content

ssh.interactive() doesn't interpret ansi escape codes in output #2703

@peace-maker

Description

@peace-maker

Starting an interactive shell on a remote machine prints the ansi escape code in an escaped form instead of interpreting them on the command line. This might be since the term module rewrite #2242 @Arusekk?

They should be interpreted correctly and the colors should be displayed correctly.

ssh(host='bandit.labs.overthewire.org', user='bandit0', password='bandit0', port=2220).interactive()
...
  Enjoy your stay!

\x1b[?2004h\x1b]0;bandit0@bandit: ~\x07bandit0@bandit:~$ cd /home/bandit0
\x1b[?2004l\x1b[?2004h\x1b]0;bandit0@bandit: ~\x07bandit0@bandit:~$ id
\x1b[?2004luid=11000(bandit0) gid=11000(bandit0) groups=11000(bandit0)
\x1b[?2004h\x1b]0;bandit0@bandit: ~\x07bandit0@bandit:~$

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions