From: Ignasi Palou-R. <pa...@mi...> - 2001-08-31 15:01:39
|
I'm trying to execute some remote commands through ssh. I saw some of the sample code in comp.lang.python and then this package. I'm not having any success. I can get a remote connection, whether passing a password or using RSA keys. The problem is that I can't get it to execute the remote command. Here is what happens: localhost% python2 pyssh.py host=remote_host command=date debug=1 >> child took 5 command bytes >> child response is 'date\r\n' results = 'date\r\n' But this should work, because calling ssh directly does: localhost% ssh remote_host date Fri Aug 31 10:54:25 EDT 2001 I have set RSAA authentication between localhost and remote_host as you can see. Basically, the remote host is not getting what I send as a command, and I just get the echo back. This is exaclty the same problem I have if I try to code it up myself. I get this same result both at work (RedHat Linux 7.1, Python 2.1.1) and home (Debian Woody, Python 2.0.1) -- Ignasi. |