From: Johannes G. <j_g...@ho...> - 2003-01-23 16:55:41
|
christian laubscher <christian@ti...> said: >def main(): > mycon=pyssh.Ssh('tiger','localhost','22') > mycon.set_debuglevel(0) > mycon.set_sshpath(pyssh.SSH_PATH) > mycon.login() > cmd='ps auxw | grep httpd | grep -v grep ; echo $?' > C=mycon.sendcmd(cmd) > print C > mycon.close() > >main() That got me roling! Thanks! Another question (I know that this is bad style, but I'd like to do it anyway): can I hand ssh the password as a variable? How? Another question (it never stops ... ;0): How do I do scp - I think sourceforge sells pyssh als ssh AND scp wrapper? ># ymmv ;-) ? Cheers and good night, Joh _________________________________________________________________ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail |