Login from terminal fails

Support for security such as Firewalls and securing linux
Post Reply
LPTK
Posts: 3
Joined: 2020/05/01 14:08:45

Login from terminal fails

Post by LPTK » 2020/05/01 14:14:01

Hi
I have a centos7 (Core) VPS.(It does not have a GUI)
when I try to login from terminal with root or some other account the login just comes up again.
I'm sure that I'm using correct credentials because when i put wrong password, it says so and gives an error, But when I put correct password it says nothing and login comes back again.
with SSH it just says /bin/bash: Permission Denied.

can anyone help?

User avatar
TrevorH
Forum Moderator
Posts: 29132
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Login from terminal fails

Post by TrevorH » 2020/05/01 14:39:33

So you have no way to access the system at all? If so then you do not stand a chance of discovering what's wrong.
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

LPTK
Posts: 3
Joined: 2020/05/01 14:08:45

Re: Login from terminal fails

Post by LPTK » 2020/05/06 08:43:11

Solved!
I'm putting this here if anyone has the same problem

I had Direct Admin installed and I had a FTP service running, through Direct Admin I could edit sshd_config. then added

Code: Select all

ForceCommand internal-sftp
and restarted the server.
after that i could connect to it via SFTP and as I had guessed it was SELinux's fault. I edited

Code: Select all

/etc/selinux/config 
and disabled it.
after restarting. i could login just fine.
I should say though, that I could not edit selinux config directly via Direct Admin.
And I was lucky that I could still edit sshd_config and had a FTP service running.

User avatar
TrevorH
Forum Moderator
Posts: 29132
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Login from terminal fails

Post by TrevorH » 2020/05/06 09:30:33

I had Direct Admin installed and I had a FTP service running, through Direct Admin I could edit sshd_config. then added
Could you get any more insecure?
it was SELinux's fault. I edited /etc/selinux/config and disabled it.
Oh, yes, you can :-(

Please don't do that.
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

LPTK
Posts: 3
Joined: 2020/05/01 14:08:45

Re: Login from terminal fails

Post by LPTK » 2020/05/08 08:12:36

Could you get any more insecure?
it was a testing server :lol:

Post Reply

Return to “CentOS 7 - Security Support”