You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 26, 2020. It is now read-only.
Fix me if I'm wrong
I don't know how you guys can copy and run the script within this function in attacks.run_script.RunScript#_run_script
def_run_script(self, host, user, local_script, remote_script, pem):
""" Copy a script to a remote host and exec it. """self.log.info("running %s in node %s", local_script, host)
pem_decoded=base64.b64decode(pem).decode()
temp=tempfile.NamedTemporaryFile('w', delete=False)
temp.write(pem_decoded)
temp.flush()
temp.close()
self.log.info("connect ssh client to %s with user %s", host, user)
self.log.info("Executing remote script")
The text was updated successfully, but these errors were encountered:
You're right. The old SSH code was removed due to license incompatibilities. If you look at the prior commit, you can see the correct code which was based on paramiko library. This needs to be fixed.
def_run_script(self, host, local_script, public_key):
""" Copy a script to a remote host and exec it. """self.log.info("running %s in node %s", local_script, host)
withopen(local_script) asfp:
local_script=fp.read()
step1=SSHKeyDeployment(public_key)
step2=ScriptDeployment(local_script)
deployment=MultiStepDeployment([step1, step2])
conn=self.driverimages=conn.list_images()
sizes=conn.list_sizes()
# deploy_node takes the same base keyword arguments as create_node.conn.deploy_node(name='deploy_local_script', image=images[0], size=sizes[0],
deploy=deployment)
If you think it makes sense, I would like to make PR @gdiazlo
Fix me if I'm wrong
I don't know how you guys can copy and run the script within this function in
attacks.run_script.RunScript#_run_script
The text was updated successfully, but these errors were encountered: