In RedHat , I want to login with other user firstly in SSH, such as the user input when installing OS , then su - root , instead of being able to login with root directly in SSH How to set in command line and config files ? I have no UI .
Asked
Active
Viewed 89 times
-2
-
I also want to be able to login with root by ssh , just should be su from other user in ssh , instead of login with root directly by ssh such as : login with user1 in ssh, then "su - root" , input the password of root , then switched to root in ssh – caiyufei Nov 30 '16 at 04:58
-
Possible duplicate of [How do I disable remote root login via ssh?](http://unix.stackexchange.com/questions/8884/how-do-i-disable-remote-root-login-via-ssh) – Ulrich Schwarz Nov 30 '16 at 07:30
2 Answers
0
You need to disable root login you need to empty the /etc/securetty file so that the root user cant login via console for refrance here is the link disable console root login.
AReddy
- 3,122
- 5
- 35
- 75
-1
Next time, try a magical thing called search engine before asking.
See here:
http://www.howtogeek.com/howto/linux/security-tip-disable-root-ssh-login-on-linux/
Tobias
- 567
- 3
- 10
-
Thanks , I searched before asking , But ... had not found , Worked now – caiyufei Nov 30 '16 at 06:04