What method are you using to check for the .htaccess file? If using ftp, which client are you running? Most ftp programs won’t show it unless you configure them to “view hidden files”. For security reasons, web browsers aren’t allowed to view the files, even if you explicitly type the path to the file. When viewing the directory through ssh, you won’t see those files with “ls”, you have to use “ls -a”.
When this is configured properly, you will also see a .htpasswd file on the server. Here’s an example of a protected directory for one of my clients: