0

I have two machines master, slave. They have passwordless ssh setup between them. i.e master -> master and master -> slave

I noticed the following problem

user@master$ ssh master sudo whoami
sudo: no tty present and no askpass program specified
user@master$ ssh slave sudo whoami
root
user@master$ ssh -t master sudo whoami
[sudo] password for user:

I am suprprised i have to type password for local machine but not for remote! How can i bypass the sudo prompt on master itself?

Thanks

3
  • What user are you logging in as on slave, and what OS is it using? Also, paste the contents of your .ssh/config file - make sure to change the IPs though :)
    – jackweirdy
    Mar 1, 2013 at 11:20
  • by default ssh takes the current user, which above case is "user" ..both machines have same user names. I am using ubuntu oneiric on master and natty on slave.
    – FUD
    Mar 1, 2013 at 11:23
  • In which case you should move this question to askubuntu.com :)
    – jackweirdy
    Mar 1, 2013 at 11:42

1 Answer 1

1

Add your user entry to /etc/sudoers, by using visudo tool.

Line should look like:

user ALL=(ALL) NOPASSWD: ALL

This would allow you to bypass password prompt.

You must log in to answer this question.