SciGaP / eht_gateway

a hold place for EHT gateway related: https://eht.scigap.org
0 stars 0 forks source link

public key issue with ssh jump #8

Open webgisdeveloper opened 6 months ago

webgisdeveloper commented 6 months ago

there are two solutions:

  1. added the public key used to login the first vm to the second vm .ssh/authorized_keys:
    c2 = Connection(sshB, user=userB, gateway=c1)
  2. copy the key used to login the second VM to the local host:
    c2 = Connection(sshB, user=userB, connect_kwargs={"key_filename":path_to_the_private_file,'passphrase': pass}, gateway=c1)
webgisdeveloper commented 6 months ago

to capture the output: out=c2.run("condor_q",hide=True) print(out.stdout) print(out.stderr)