# authorized\_key key\_options error

**URL:** <https://forum.ansible.com/t/authorized-key-key-options-error/14867>\
**Category:** Ansible Project\
**Created:** [March 26, 2014, 9:00pm UTC](https://forum.ansible.com/t/authorized-key-key-options-error/14867 "2014-03-26T21:00:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Adham\_H](https://avatars.discourse-cdn.com/v4/letter/a/b2d939/32.png) [@Adham\_H](https://forum.ansible.com/u/Adham_H)\
**Post date:** [March 26, 2014, 9:00pm UTC](https://forum.ansible.com/t/authorized-key-key-options-error/14867/1 "2014-03-26T21:00:16Z")

</div>

I am trying to add to the authorized\_key key\_option the following

`

- name: Deploy user  
authorized\_key:  
user=“user”  
key=“{{user\_key}}”  
key\_options=‘no-pty,permitopen=“localhost:2313”’

`

I get msg: invalid option string: no-pty,permitopen=localhost:10050

Should i craft my string in a different way then the authorized\_key ?

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [March 26, 2014, 11:46pm UTC](https://forum.ansible.com/t/authorized-key-key-options-error/14867/2 "2014-03-26T23:46:36Z")

</div>

There appears to be too much attempt to validation options given in [https://github.com/ansible/ansible/blob/devel/library/system/authorized\_key#L214](https://github.com/ansible/ansible/blob/devel/library/system/authorized_key#L214)

Can you please file a bug on github about this so we can take a look at this?

It is probably being done to determine if it should make a change or not, but it seems to not understand everything it needs to understand.

Thanks!

---

<div class="post-metadata">

**Author:** ![Adham\_H](https://avatars.discourse-cdn.com/v4/letter/a/b2d939/32.png) [@Adham\_H](https://forum.ansible.com/u/Adham_H)\
**Post date:** [March 27, 2014, 8:16am UTC](https://forum.ansible.com/t/authorized-key-key-options-error/14867/3 "2014-03-27T08:16:10Z")

</div>

Micheal,

Thank you, reported [https://github.com/ansible/ansible/issues/6716](https://github.com/ansible/ansible/issues/6716)
