コード例 #1
0
ファイル: test_sshforward.py プロジェクト: mcclurmc/juju
 def test_prepare_ssh_sharing_not_master(self):
     args = prepare_ssh_sharing()
     self.assertEquals(args, [
         "-o",
         "ControlPath " + self.home + "/.juju/ssh/master-%r@%h:%p",
         "-o", "ControlMaster no",
     ])
     self.assertFalse(os.path.exists(self.home + "/.juju/ssh"))
コード例 #2
0
ファイル: test_sshforward.py プロジェクト: mcclurmc/juju
 def test_prepare_ssh_sharing_auto_master(self):
     args = prepare_ssh_sharing(auto_master=True)
     self.assertEquals(args, [
         "-o",
         "ControlPath " + self.home + "/.juju/ssh/master-%r@%h:%p",
         "-o", "ControlMaster auto",
     ])
     self.assertTrue(os.path.isdir(self.home + "/.juju/ssh"))
コード例 #3
0
ファイル: ssh.py プロジェクト: mcclurmc/juju
def open_ssh(flags, ip_address, ssh_command):
    # XXX - TODO - Might be nice if we had the ability to get the user's
    # private key path and utilize it here, ie the symmetric end to
    # get user public key.
    args = ["ssh"]
    args.extend(prepare_ssh_sharing())
    args.extend(flags)
    args.extend(["ubuntu@%s" % ip_address])
    args.extend(ssh_command)
    os.execvp("ssh", args)
コード例 #4
0
ファイル: ssh.py プロジェクト: anbangr/trusted-juju
def open_ssh(flags, ip_address, ssh_command):
    # XXX - TODO - Might be nice if we had the ability to get the user's
    # private key path and utilize it here, ie the symmetric end to
    # get user public key.
    args = ["ssh"]
    args.extend(prepare_ssh_sharing())
    args.extend(flags)
    args.extend(["ubuntu@%s" % ip_address])
    args.extend(ssh_command)
    os.execvp("ssh", args)