projects
/
remote-debug.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rename file and add readme
[remote-debug.git]
/
suanzi-support
diff --git
a/suanzi-support
b/suanzi-support
index
678853d
..
367f379
100755
(executable)
--- a/
suanzi-support
+++ b/
suanzi-support
@@
-1,9
+1,5
@@
#!/usr/bin/env python2
#!/usr/bin/env python2
-# dependencies:
-# 1. pip install paho-mqtt
-# 2. apt-get install sshpass
-#
from subprocess import call, Popen, PIPE, STDOUT
import paho.mqtt.client as mqtt
import shlex
from subprocess import call, Popen, PIPE, STDOUT
import paho.mqtt.client as mqtt
import shlex
@@
-38,7
+34,7
@@
def getAvailablePort(host, ports):
def exec_ssh(port):
if port == None:
raise Exception('Port not avaliable')
def exec_ssh(port):
if port == None:
raise Exception('Port not avaliable')
- command = 'sshpass -p' + PASSWORD + ' ssh -o "ServerAliveInterval 60" -o "ServerAliveCountMax 3" -fCR ' + str(port) +':localhost:22 ' + USER + '@' + SSH_SERVER + ' sleep ' + str(ALIVE_TIME)
+ command = 'sshpass -p' + PASSWORD + ' ssh -o "S
trictHostKeyChecking=no" -o "UserKnownHostsFile /dev/null" -o "S
erverAliveInterval 60" -o "ServerAliveCountMax 3" -fCR ' + str(port) +':localhost:22 ' + USER + '@' + SSH_SERVER + ' sleep ' + str(ALIVE_TIME)
print command
return call(shlex.split(command), shell=False)
print command
return call(shlex.split(command), shell=False)