Error access denied showes up ssh login

Support for security such as Firewalls and securing linux
Post Reply
Posts: 1
Joined: 2020/05/16 22:10:29

Error access denied showes up ssh login

Post by hasr7 » 2020/05/16 22:22:39

i have no problem with logging in as root. ;)
but when i tried to login as a user into ssh, access denied error occured! :x
how to deal with this error? :|

Forum Moderator
Posts: 2453
Joined: 2007/09/03 21:18:09
Location: NYC

Re: Error access denied showes up ssh login

Post by scottro » 2020/05/16 23:49:12

Do you have any sort of limitation on which users are allowed to connect? (Usually done by adding an AllowUser entry to sshd_config).
Is it running on port 22 or a non-standard port, which usually requires an adjustment to SELinux, though I think if that were the case, root couldn't log in either.

You can try ssh -vvv <target> to see if you get more information, sometimes it will say why access is denied. You'd be surprised how many people accidentally put on capslock or misspell a password several times.

journalctl _SYSTEMD_UNIT=sshd.service | egrep "Failed|Failure" may show if it's a bad password. If so, you can try logging in as root and resetting the user's password.

Note (once you get a regular user working) many systems choose to not let root log in via ssh.
Other possibilities include doing something like giving the user a non-existent shell or no home directory.
New users should check the FAQ and Read Me First pages

Post Reply

Return to “CentOS 7 - Security Support”