I am struggling for the past couple of days to figure out why is paramiko sending \x07 instead of tab to remote session. I am using paramikos invoke_shell because i need to run several interconnected commands. Everything works except for this part:
check_export = f'echo -e \"this\tis\tjust a test\" > /tmp/export'
This is simplified version, the only important part is that i need to have words delimited by a tab (in certain places only). print returns correct form:
echo -e "this is just a test" > /tmp/export
but when i check the recv() from paramiko session i see this:
b'echo -e "this\x07is\x07just a test" > /tmp/export\r\n[root@server~]# '
and as a result the file /tmp/export does not contain tabs and those first 3 words are jammed together.
I have tried providing literal tab, \t, U00000009, nothing works.
I also tried doing .encode() on the string, but i get error that bytes are expected, not string.
What am i missing here? I would appreciate some input. Thanks