Add the required pam_access line to your system-auth or login file in the /etc/pam.d directory. This needs to be the first auth line to override the previous one.

auth required pam_access.so

Now add the following to the /etc/security/access.conf file.

-:username:tty#