libnetconf2 icon indicating copy to clipboard operation
libnetconf2 copied to clipboard

Set accepted Call Home SSH authentication methods is publickey ,report error:"nc ERROR: Unable to authenticate to the remote server"

Open pengrong1 opened this issue 4 years ago • 2 comments

we program the call home server based on libnetconf2, then set accepted Call Home SSH authentication method is publickey(publickey, password, interactive are supported by default). nc_server_ssh_ch_client_endpt_set_auth_methods(CALL_HOME_CLIENT_NAME, CALL_HOME_CLIENT_ENDPT, NC_SSH_AUTH_PUBLICKEY ); I use netopeer2-cli to test my program, netopeer2-cli report the error is "nc ERROR: Unable to authenticate to the remote server (all attempts via supported authentication methods failed). cmd_listen: Receiving SSH Call Home on port 4334 as user "root" failed". my program report error as follow:

[INF]: Trying to connect via IPv4 to 192.168.114.114:4334.                      
[INF]: Successfully connected to 192.168.114.114:4334 over IPv4.                
[INF]: Received an SSH message "request-service" of subtype "ssh-userauth".     
[INF]: Received an SSH message "request-auth" of subtype "none".                
[ERR]: Communication SSH socket unexpectedly closed.

Can you pl enlighten me if it is lack of a configure file or some other reasons?

pengrong1 avatar Jul 27 '21 06:07 pengrong1

You have allowed only publickey authentication and for that the client must use some SSH key, did you configure any? Use command auth keys to print the configured keys.

michalvasko avatar Jul 27 '21 07:07 michalvasko

I didn't configure auth keys, when I configured it, this problem soveled. Thank you very much .

pengrong1 avatar Jul 29 '21 00:07 pengrong1