# Pritunl-client cli does not prompt for OTP code

**URL:** <https://forum.pritunl.com/t/pritunl-client-cli-does-not-prompt-for-otp-code/2231>\
**Category:** Pritunl\
**Tags:** pritunl-client\
**Created:** [July 25, 2024, 10:08pm UTC](https://forum.pritunl.com/t/pritunl-client-cli-does-not-prompt-for-otp-code/2231 "2024-07-25T22:08:22Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![andy](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/a/aeb1de/32.png) [@andy](https://forum.pritunl.com/u/andy)\
**Post date:** [July 25, 2024, 10:08pm UTC](https://forum.pritunl.com/t/pritunl-client-cli-does-not-prompt-for-otp-code/2231/1 "2024-07-25T22:08:22Z")

</div>

Hello, I’ve attempted to use the pritunl-client cli as described here [Command Line Interface](https://docs.pritunl.com/docs/command-line-interface)

However, connection attempts are failing. The server logs show `ERROR User auth failed "Challenge OTP code"`

The client never prompted me for the OTP. How am I supposed to enter it?

---

<div class="post-metadata">

**Author:** ![zach](https://forum.pritunl.com/user_avatar/forum.pritunl.com/zach/32/1105_2.png) [@zach](https://forum.pritunl.com/u/zach)\
**Post date:** [July 26, 2024, 3:43pm UTC](https://forum.pritunl.com/t/pritunl-client-cli-does-not-prompt-for-otp-code/2231/2 "2024-07-26T15:43:12Z")

</div>

With the CLI client you need to either add `--password-read` to prompt for the password or `--password=PASSWORD` to set the password in the command.

---

<div class="post-metadata">

**Author:** ![andy](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/a/aeb1de/32.png) [@andy](https://forum.pritunl.com/u/andy)\
**Post date:** [July 26, 2024, 4:01pm UTC](https://forum.pritunl.com/t/pritunl-client-cli-does-not-prompt-for-otp-code/2231/3 "2024-07-26T16:01:32Z")

</div>

Yes, I did that. `pritunl-client start <profile_id> -r`

I entered my pin that works with the MacOS GUI client, the connection failed and I saw that error message in the server logs. Am I supposed to include the OTP code with my pin when prompted with the `-r` flag?

Or does the pritunl-client cli not support MFA at all?

---

<div class="post-metadata">

**Author:** ![zach](https://forum.pritunl.com/user_avatar/forum.pritunl.com/zach/32/1105_2.png) [@zach](https://forum.pritunl.com/u/zach)\
**Post date:** [July 26, 2024, 4:55pm UTC](https://forum.pritunl.com/t/pritunl-client-cli-does-not-prompt-for-otp-code/2231/4 "2024-07-26T16:55:00Z")

</div>

With a pin the format is `PIN (111111) + OTP (222222)` these single password formats are documented in the [**two-step authentication documentation**](https://docs.pritunl.com/docs/two-step-authenticatio).

---

<div class="post-metadata">

**Author:** ![andy](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/a/aeb1de/32.png) [@andy](https://forum.pritunl.com/u/andy)\
**Post date:** [July 26, 2024, 8:24pm UTC](https://forum.pritunl.com/t/pritunl-client-cli-does-not-prompt-for-otp-code/2231/5 "2024-07-26T20:24:49Z")

</div>

I gave that a try with either the -r flag or -p flag and neither worked.

My credentials and MFA work just fine through the GUI.

I entered my password like this. Pin ex: 1111111111, OTP ex: 555555… `1111111111555555`

I’m still getting the same error.

---

<div class="post-metadata">

**Author:** ![zach](https://forum.pritunl.com/user_avatar/forum.pritunl.com/zach/32/1105_2.png) [@zach](https://forum.pritunl.com/u/zach)\
**Post date:** [July 27, 2024, 3:04am UTC](https://forum.pritunl.com/t/pritunl-client-cli-does-not-prompt-for-otp-code/2231/6 "2024-07-27T03:04:23Z")

</div>

I have updated the CLI code to prompt for each component but this will still send the password in the same `PIN (111111) + OTP (222222)` format as it is done in the GUI [**pritunl-client-electron/client/app/components/ProfileConnect.tsx**](https://github.com/pritunl/pritunl-client-electron/blob/master/client/app/components/ProfileConnect.tsx#L347). This will be included in the next release.
