Disable local user from remote login

Is there a way to disable a certain local user from remote login, and only allow su to that user. :confused:

i know i can stop remote login for root user, i need it for other users.

Appreciate your help

try adding Deny users directive in your sshd_config

DenyUsers user1 user2 user3

thanks

it worked ...

But it will only deny the SSH connections. There will be some more ways open to connect the machine like : telnet etc.

Please make sure if only SSH connections require to be disabled.

Thanks,
Deepak

Telnet is already disabled , I need this because I want to force users to authenticate with AD then au to local service users or rbac roles for root.

I want to make it more controlled

thx