Bom dia Srs,
Possuo um servidor interno de SSH configurado da seguinte maneira:
# Package generated configuration file
# See the sshd( manpage for details
# What ports, IPs and protocols we listen for
Port xxxx
# Use these options to restrict which interfaces/protocols sshd will bind to
#ListenAddress ::
#ListenAddress 0.0.0.0
Protocol 2
# HostKeys for protocol version 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
#Privilege Separation is turned on for security
UsePrivilegeSeparation yes
# Lifetime and size of ephemeral version 1 server key
KeyRegenerationInterval 3600
ServerKeyBits 768
# Logging
SyslogFacility AUTH
LogLevel INFO
# Authentication:
LoginGraceTime 900
PermitRootLogin yes
StrictModes yes
RSAAuthentication yes
PubkeyAuthentication yes
#AuthorizedKeysFile %h/.ssh/authorized_keys
# Don't read the user's ~/.rhosts and ~/.shosts files
IgnoreRhosts yes
# For this to work you will also need host keys in /etc/ssh_known_hosts
RhostsRSAAuthentication no
# similar for protocol version 2
HostbasedAuthentication no
# Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication
#IgnoreUserKnownHosts yes
# To enable empty passwords, change to yes (NOT RECOMMENDED)
PermitEmptyPasswords no
# Change to yes to enable challenge-response passwords (beware issues with
# some PAM modules and threads)
ChallengeResponseAuthentication no
# Change to no to disable tunnelled clear text passwords
#PasswordAuthentication yes
# Kerberos options
#KerberosAuthentication no
#KerberosGetAFSToken no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes
X11Forwarding yes
X11DisplayOffset 10
PrintMotd no
PrintLastLog yes
TCPKeepAlive yes
#UseLogin no
#MaxStartups 10:30:60
#Banner /etc/issue.net
# Allow client to pass locale environment variables
AcceptEnv LANG LC_*
Subsystem sftp /usr/lib/openssh/sftp-server
UsePAM yes
DenyUsers root
#AllowUsers user1 user2 user3 ... teste
#AllowGroups administradores users
O que ocorre é que nenhum dos usuários que criei no sistema acessa o SSH, só o usuáro teste consegue. O que mais meconfundiu é que quando coloquei os usuários no AllowUsers, até o teste para de acessar. A mensagem de erro no /var/log/auth.log é:
Sep 2 11:25:56 servername sshd[20226]: Invalid user user1 from 192.168.1.215
Sep 2 11:25:56 servername sshd[20226]: Failed none for invalid user user1 from 192.168.1.215 port 50324 ssh2
Sep 2 11:26:01 servername CRON[20228]: pam_unix(cron:session): session opened for user root by (uid=0)
Sep 2 11:26:01 servername CRON[20228]: pam_unix(cron:session): session closed for user root
Sep 2 11:26:02 servername sshd[20226]: pam_unix(sshd:auth): check pass; user unknown
Sep 2 11:26:02 servername sshd[20226]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=192.168.1.215
Sep 2 11:26:04 servername sshd[20226]: Failed password for invalid user user1 from 192.168.1.215 port 50324 ssh2
Sep 2 11:26:45 servername sshd[20226]: pam_unix(sshd:auth): check pass; user unknown
Sep 2 11:26:47 servername sshd[20226]: Failed password for invalid user user1 from 192.168.1.215 port 50324 ssh2
Alguém sabe o que posso fazer? Todos estes usuários estão no grupo "users". Abaixo umalista do que já tentei:
- Colocar os usuários no grupo SSH.
- Colocar o UID como 0 (deixar o usuário como root) e permitir o root login.
- Trocar as senhas, caso fosse erro de grafia e substituir todas por uma senha padrão.
- Antes haviam 3 usuários no grupo administradores, foram tranferidos parao grupo "users". O usuário teste (que funciona) está no grupo "users".
- Verifiquei no etc/passwd e não há diferença entre o usuário teste o os outros usuários.
- Verifiquei no etc/group e não há um grupo onde o "teste"esteja inserido e outro usuário não.
Alguem sabe o que mais posso olhar/tentar?