I could not able to run shell command in parallel machine " sudo: sorry, you must have a tty to run sudo"

365 views
Skip to first unread message

Inr Ayyanar

unread,
Sep 9, 2015, 12:03:22 AM9/9/15
to pdsh-users
[ayyanar@h1 tests]$ pdsh
pdsh> sudo wget -nv http://public-repo-1.hortonworks.com/HDP/centos6/2.x/GA/2.2.0.0/hdp.repo -O /etc/yum.repos.d/hdp.repo
192.168.1.53: sudo: sorry, you must have a tty to run sudo
pdsh@h1: 192.168.1.53: ssh exited with exit code 1
192.168.1.52: sudo: sorry, you must have a tty to run sudo
pdsh@h1: 192.168.1.52: ssh exited with exit code 1
pdsh>


Waiting for your valuable solution.

Thanks,
Ayyanar

Rick Troth

unread,
Sep 9, 2015, 11:04:47 AM9/9/15
to pdsh-...@googlegroups.com
On 09/09/2015 12:03 AM, Inr Ayyanar wrote:
> 192.168.1.53: sudo: sorry, you must have a tty to run sudo
> pdsh@h1: 192.168.1.53: ssh exited with exit code 1
> 192.168.1.52: sudo: sorry, you must have a tty to run sudo
> pdsh@h1: 192.168.1.52: ssh exited with exit code 1

This is normal.

SUDO might need to prompt for a password, in which case it *must* have a
TTY (either logical or physical, local or remote).

Either use the "-t" option when spawning SSH (client side) or look for
the "requiretty" setting (server side).

-- R; <><



John Westerdale

unread,
Sep 9, 2015, 2:08:05 PM9/9/15
to pdsh-...@googlegroups.com

Gotta comment-out the requiretty line on the destination server.

“Obstacles are those frightful things you see when you take your eyes off your goal.” – H.Ford

--
You received this message because you are subscribed to the Google Groups "pdsh-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pdsh-users+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages