def set_ssh_key(public_key):
    _xml = """<RIBCL VERSION="2.0">
                <LOGIN USER_LOGIN="adminname" PASSWORD="password">
                  <RIB_INFO MODE="write">
                    <IMPORT_SSH_KEY>
                      -----BEGIN SSH KEY-----
                      {0}
                      -----END SSH KEY-----
                    </IMPORT_SSH_KEY>
                  </RIB_INFO>
                </LOGIN>
              </RIBCL>""".format(public_key)

    return __execute_cmd('Import_SSH_Publickey', _xml)
Configure SSH public keys for specific users
dataset/ETHPy150Open saltstack/salt/salt/modules/ilo.py/set_ssh_key