leichongxiang / sshpt

Automatically exported from code.google.com/p/sshpt
0 stars 0 forks source link

Problem sending script to remote machines... #2

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. I create a script with 2 commands:

$ cat script.sh
#!/usr/bin/ksh
pwd
uname -a

2. I try send to machines (2 machines in my machine's file):

$ ./sshpt.py -u myuser -P mypass -f maqs -c script.sh -x
"slx00010299","SUCCESS","2010-07-13 17:43:19.596311","sshpt: sftp.put script.sh 
slx00010299:/tmp/","0: Failure
1: "
"slx00010300","SUCCESS","2010-07-13 17:43:20.594740","sshpt: sftp.put script.sh 
slx00010300:/tmp/","0: Failure
1: "

What is the expected output? What do you see instead?

I don't know. I never have seen the correct output.

What version of the product are you using? On what operating system?

Ubuntu 9.04
Linux bypper 2.6.28-19-generic #61-Ubuntu SMP Wed May 26 23:35:15 UTC 2010 i686 
GNU/Linux
Python 2.6.2

Please provide any additional information below.

If I run a remote command in the same machines, no problem:

$ ./sshpt.py -u myuser -P mypass -f maqs "uname -a"
"slx00010299","SUCCESS","2010-07-13 17:42:43.601907","uname -a","Linux 
SLX00010299 2.6.5-7.308-bigsmp #1 SMP Mon Dec 10 11:36:40 UTC 2007 i686 i686 
i386 GNU/Linux"
"slx00010300","SUCCESS","2010-07-13 17:42:44.720475","uname -a","Linux 
SLX00010300 2.6.5-7.308-bigsmp #1 SMP Mon Dec 10 11:36:40 UTC 2007 i686 i686 
i386 GNU/Linux"

The script isn't in /tmp from remote machine.

Original issue reported on code.google.com by linuxalb...@gmail.com on 13 Jul 2010 at 3:56

GoogleCodeExporter commented 9 years ago
Here is a patch for sshpt.py that should fix this broken feature.

Original comment by preston....@gmail.com on 16 Sep 2010 at 2:53

Attachments:

GoogleCodeExporter commented 9 years ago
OK. Solved

Thank you

Original comment by linuxalb...@gmail.com on 27 Sep 2010 at 12:21

GoogleCodeExporter commented 9 years ago
I have incorporated your patch into SVN release 36.  I still need to test it 
but barring any major issues it should show up in the next SSHPT release.  
Thank you.

Original comment by riskable on 19 Oct 2010 at 2:17