I am trying to establish a connection using libssh(https://www.libssh.org/) to a machine with SUSE Enterprise operating system installed.
    ssh_options_set(tempSshSession, SSH_OPTIONS_HOST, host2Connect);
    ssh_options_set(tempSshSession, SSH_OPTIONS_LOG_VERBOSITY, &verbosity);
    ssh_options_set(tempSshSession, SSH_OPTIONS_PORT, &port);
    int rc = ssh_connect(tempSshSession);
    if(rc != SSH_OK) {
        printf("Error connecting to the localhost\n");
        exit(-1);
    }
    // Authorized by the password.
    rc = ssh_userauth_password(tempSshSession, username, password);
After ssh_userauth_password() call it returns the response : "SSH_AUTH_DENIED: Authentication failed: use another method"
It works fine for operating systems like: Ubuntu, Linux Generic and CentOS.
Thanks
                        
Check
/etc/ssh/sshd_config. You should findPermitRootLogin forced-command-onlysomewhere there. Set that toyesand your problem should be gone. Please keep in mind that there is a reason, why folks have decided to not allow per default root user/pass logins.