Can't access SSH after run iptables -P OUTPUT DROP

Restart it from the console. If you only did the iptables command from the shell prompt it’s not permanent.