# Device authentication

**URL:** https://hub.mender.io/t/device-authentication/7825
**Category:** General Discussions
**Created:** [June 6, 2025, 1:20pm UTC](https://hub.mender.io/t/device-authentication/7825 "2025-06-06T13:20:44Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![StMartin81](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/stmartin81/32/1745_2.png) [@StMartin81](https://hub.mender.io/u/StMartin81)
#### Post date: [June 6, 2025, 1:20pm UTC](https://hub.mender.io/t/device-authentication/7825/1 "2025-06-06T13:20:44Z")

</div>

Hello,

After I have flashed an image onto a device and boot the device I don’t see an authentication request in the web interface. Only after I reboot the device an authentication request will be shown. If I want to use the troubleshoot plugin I have to reboot one more time until I can login onto the device using the troubleshoot plugin. Is this the expected behavior?

Summay:

- First boot: Device doesn’t send authentication request
- Second boot: Device sends authentication request but troubleshoot is not yet working
- Third boot: Now troubleshoot is also working

Output from mender-authd after first boot:

```auto
Jan 01 01:00:14 scarthgap systemd[1]: Started Mender authentication service.
Jan 01 01:00:15 scarthgap mender-auth[558]: record_id=1 severity=error time="1970-Jan-01 01:00:15.317118" name="Global" msg="Got error loading the private key from the keystore: No key in memory: Error loading private key from /var/lib/mender/mender-agent.pem: Failed to load the private key from: /var/lib/mender/mender-agent.pem error: error:80000002:system library::No such file or directory
Jan 01 01:00:15 scarthgap mender-auth[558]: System error, code=2, No such file or directory"
Jan 01 01:00:15 scarthgap mender-auth[558]: record_id=2 severity=info time="1970-Jan-01 01:00:15.317642" name="Global" msg="Generating new RSA key"
Jan 01 01:00:16 scarthgap mender-auth[558]: record_id=3 severity=info time="1970-Jan-01 01:00:16.326953" name="Global" msg="The authentication daemon is now ready to accept incoming authentication request"

```

The Mender versions I’m using are:

```auto
# mender-auth --version
4.0.3
# mender-connect --version
mender-connect version 2.2.1 runtime: go1.22.12

```
