currently, i have statements like :
system("ssh -o StrictHostKeyChecking=no root\@${address} \"cat /var/log/messages"");
This did not require a password, since the two systems were setup with proper key exchange

now this is no longer available: hence:

i want to be able to :

1. Login as "admin"
2. Supply a password
3. do a sudo -i
4. supply a password
5. run the same command "cat /var/log/messages"

Thanks,
-Kamal.