# Is it possible to provide options to ssh to enable tty?

**URL:** <https://forum.ansible.com/t/is-it-possible-to-provide-options-to-ssh-to-enable-tty/16712>\
**Category:** Ansible Project\
**Created:** [November 6, 2014, 6:40pm UTC](https://forum.ansible.com/t/is-it-possible-to-provide-options-to-ssh-to-enable-tty/16712 "2014-11-06T18:40:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Craig\_Wickesser](https://avatars.discourse-cdn.com/v4/letter/c/aeb1de/32.png) [@Craig\_Wickesser](https://forum.ansible.com/u/Craig_Wickesser)\
**Post date:** [November 6, 2014, 6:40pm UTC](https://forum.ansible.com/t/is-it-possible-to-provide-options-to-ssh-to-enable-tty/16712/1 "2014-11-06T18:40:09Z")

</div>

When I SSH into a host it requires tty to perform sudo commands, is it possible to tell ansible to use “-t” or “-t -t” when SSHing to a host? I’m also on CentOS6 so it’s using paramiko.

Thanks.

---

<div class="post-metadata">

**Author:** ![Toshio\_Kuratomi](https://avatars.discourse-cdn.com/v4/letter/t/41988e/32.png) [@Toshio\_Kuratomi](https://forum.ansible.com/u/Toshio_Kuratomi)\
**Post date:** [November 7, 2014, 4:51pm UTC](https://forum.ansible.com/t/is-it-possible-to-provide-options-to-ssh-to-enable-tty/16712/2 "2014-11-07T16:51:09Z")

</div>

Hi, I'm afraid I don't quite understand the problem you're scenario.  
What are you trying to do and how is it failing?

Thanks,  
-Toshio

---

<div class="post-metadata">

**Author:** ![Craig\_Wickesser](https://avatars.discourse-cdn.com/v4/letter/c/aeb1de/32.png) [@Craig\_Wickesser](https://forum.ansible.com/u/Craig_Wickesser)\
**Post date:** [November 7, 2014, 5:12pm UTC](https://forum.ansible.com/t/is-it-possible-to-provide-options-to-ssh-to-enable-tty/16712/3 "2014-11-07T17:12:31Z")

</div>

I found the answer (thanks to Faux in irc), in ansible.cfg you can set specify “ssh\_args” if you’re using OpenSSH (which I’m not now but will once I upgrade to a newer OS or version of OpenSSH).

In my case, I’d add the following to ansible.cfg

ssh\_args = -t -t
