I have a simple paramiko
script that connects to a server and executes a command:
command = "cd /path/to/command_file; sh command;"
stdin, stdout, stderr = ssh.exec_command(command)
stdin.write('test')
lines = stdout.readlines()
print(lines)
ssh.close()
That command
file executes some things I don't understand much (separated in lines for readability):
/path/to/hex_file/hex -h 35
-cpterm iso8859-1
-cpstream ibm850
-pf /path/to/databases_list/database_list.pf
-p another_file.p <--- changed to '-b another_file.p' later
When it's executed, it returns:
Redirection or piping of stdin or stdout is allowed only with -b.
And when it's changed to -b
, it returns:
Batch-mode X requires a startup procedure.
There's any idea to where I can start search for that procedure? Or there's any way to permit piping of stdin?