Given a list of hostnames (one per line) in a file named hosts-list, ssh into each server in turn, sudo to root, and execute a command with sudo permissions, You will need to type in the password twice, unless you use an utility like Keepass, that allows you to copy/paste your password. This method makes it very quick and convenient to go thru a long list of servers, to perform a simple admin task. 

for name in $(cat hosts-list); do (ssh -t -o StrictHostKeyChecking=no my.username@${name} 'sudo su - -c "uname -a ; yum clean all"' 2> /dev/null) ; done