You are here: Home / What do you need? / Help and documentation / Unix tricks and information / Disable ssh access for a valid Linux user

Disable ssh access for a valid Linux user

by Darrell Kingsley last modified Mar 13, 2014 02:10 PM
If you keep being disconnected instantly you log in and su user appears to do nothing, this might be what has happened.
vi /etc/passwd

Look for line for username user

user:x:500:500::/home/user:/bin/false

and reset it to

user:x:500:500::/home/user:/bin/bash

If you want to deny ssh access, then do the reverse.

Useful link here: http://www.ducea.com/2007/12/05/howto-disable-a-user-account-in-linux/