Operating System - HP-UX
1748038 Members
5087 Online
108757 Solutions
New Discussion юеВ

Re: Disable specific user from ssh

 
SOLVED
Go to solution
yulianto piyut
Valued Contributor

Disable specific user from ssh

all,

How to restrict specific user from ssh? for example, i want to disable user apps to login to my server using ssh.

thx,
-yut-
6 REPLIES 6
Johnson Punniyalingam
Honored Contributor
Solution

Re: Disable specific user from ssh

Change the shell of the user apps to false

Example :-

app11:CALxgC.hv4zjQ:109:107:,,,:/home/ibmadm1:/usr/bin/sh

Change to

apps1:CALxgC.hv4zjQ:109:107:,,,:/home/ibmadm1:/usr/bin/false

Thanks,
Johnson
Problems are common to all, but attitude makes the difference
yulianto piyut
Valued Contributor

Re: Disable specific user from ssh

If the shell changed to false, user can not ftp to server. how?
Johnson Punniyalingam
Honored Contributor

Re: Disable specific user from ssh

If the shell changed to false, user can not ftp to server. how?

ftp to server. doesn't require's shell, something like anonymous ftp account

Thanks,
Johnon
Problems are common to all, but attitude makes the difference
Johnson Punniyalingam
Honored Contributor

Re: Disable specific user from ssh

Also can you check configuration file /opt/ssh/etc/ssh_config

When an ssh client connection request is made, the server first responds with its list of supported authentication methods. This list represents the authentication methods supported by the sshd server and the sequence in which these methods will be tried. The client can omit one or more of those authentication methods. The client can also change the sequence in which the methods are attempted. You achieve this with a configuration directive in the client configuration file, /opt/ssh/etc/ssh_config.

Problems are common to all, but attitude makes the difference
yulianto piyut
Valued Contributor

Re: Disable specific user from ssh

thx! no rule of anonymous account used for ftp in my system. I have tried to change the shell to false and try to ftp but failed. To solve it, i create /etc/shells file and put /usr/bin/false, /usr/bin/ksh, /sbin/sh.

Johnson Punniyalingam
Honored Contributor

Re: Disable specific user from ssh

Excellent and Well done ..:)

Thanks,
Johnson
Problems are common to all, but attitude makes the difference