I have a problem with a script that reads the contents of /etc/passwd from
a remote host. It doesn't always seem to read all lines:
for i in range(5):
pipe = os.popen("ssh -q root at remotehost cat /etc/passwd")
passwd = pipe.readlines()
Here's the output:
If I enter the SSH command in a shell I always get all 969 lines of
/etc/passwd (the file does not change over time). Any clues?
I am using Python 2.1, OpenSSH 2.9p1 (client), OpenSSH 2.5.2p2 (server).