I have a machine where only some users should be allowed to login and execute commands over ssh, rest all users can ssh and run commands but should not login i.e no tty for other users.
Can someone help me with this.
Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.Sign up to join this community
You should set up key-based authentication for your users on the ssh server.
Once you have key-based authentication configured, it's easy to set up the user's authorized_keys file to deny the user a tty using hte "no-pty" option for the key. Look at the man page for sshd and go to the AUTHORIZED_KEYS FILE FORMAT section for the available options: http://www.openbsd.org/cgi-bin/man.cgi?query=sshd&sektion=8