You are here

execute su -c command over ssh

ssh -t -l remote-user host "su -l root -s /bin/bash -c 'aptitude update; aptitude dist-upgrade ; aptitude clean'"