To create a password protected rar archive archive.rar with password set to password, use:

# tested with RAR 4.20 under Linux debian 3.16.0-4-686-pae #1 SMP Debian 3.16.36-1+deb8u1 (2016-09-03) i686 GNU/Linux

rar a -ppassword archive.rar folder_to_be_rared/

Creating archive test.rar

Adding    test.txt                                      OK
Done

creditz: https://www.feralhosting.com/faq/view?question=36

admin