UsernameNotFoundException If your client displays a stacktrace that looks like: This means your SSH keys were recognized and validated against the stored users but the username is not valid for the security realm your application is using at the moment. This could occur when you were using the Jenkins database initially, configured your users, and then switched to another security realm (like LDAP, etc.) where the defined users do not exist yet. To solve the problem, ensure your users exist in your configured security realm. To get more information about the authentication process: When you try to authenticate, you can then refresh the page and see what happen internally. 1. Go into  Manage Jenkins  >  System Log  >  Add new log recorder . 2. Enter any name you want and click on  Ok . 3. Click on  Add 4. Type  org.jenkinsci.main.modules.sshd.PublicKeyAuthenticatorImpl  (or type  PublicKeyAuth  and then select the full name) 5. Set the level to  ALL . 6. Repeat the previous three steps for  hudson.model.User 7. Click on  Save Troubleshooting logs 176 org.acegisecurity.userdetails.UsernameNotFoundException: <name_you_used> ...