Open wosc opened 3 years ago
i've been trying to use mockssh to test a codebase that sends arbitrary data over stdin over ssh, so i was also very excited to see the addition of stdin support, but got stuck with the hang described here too
i am very much liking this patch you've done
Since I'm currently trying to write a test harness for some legacy ssh scripts with the basic idea
cat long-input-file | ssh remotehost process.sh
, I'm really happy that mockssh just recently gained stdin support in 0.9.1. Thank you!However, it seems to me that paramiko's server.client().execute_command() handles stdin differently than openssh's
ssh
binary. This example test hangs indefinitely at while self.process.poll():I'm not at all familiar with all the internals at play here, so all I can offer is this somewhat kludgy idea -- which does make the above test case work as expected: