[root@ip:/tmp] ssh root@ip "sudo -u bob date" root@ip's password: sudo: sorry, you must have a tty to run sudo [root@ip:/tmp] but ssh -t root@ip "sudo -u bob date" solves the problem