Ejemplo n.º 1
0
def get_keys():
    from scanner.api import ssh_key
    print ssh_key.get_authorized_keys_for_host(
        'vinz-debian.student.iastate.edu', ['root', 'vinz', 'michael'])
Ejemplo n.º 2
0
def get_keys():
    from scanner.api import ssh_key
    print ssh_key.get_authorized_keys_for_host('vinz-debian.student.iastate.edu', ['root', 'vinz', 'michael'])
Ejemplo n.º 3
0
 def test_get_users(self, m_run):
     m_run.return_value = EXAMPLE_CORRECT_RETURN_VALUE
     ssh_keys = api_ssh_key.get_authorized_keys_for_host('vinz-ubuntu.student.iastate.edu', ['vinz'])
     self.assertDictEqual(ssh_keys, CORRECT_OUTPUT)
Ejemplo n.º 4
0
 def test_get_users(self, m_run):
     m_run.return_value = EXAMPLE_CORRECT_RETURN_VALUE
     ssh_keys = api_ssh_key.get_authorized_keys_for_host(
         'vinz-ubuntu.student.iastate.edu', ['vinz'])
     self.assertDictEqual(ssh_keys, CORRECT_OUTPUT)