To create a 7Z archive with password from SSH command line in Debian / Ubuntu, you can use the command like this

7z a -mx=0 -pPassword -mhe FilenameDest.7z FilenameSource.src