Showing posts with label SSH. Show all posts
Showing posts with label SSH. Show all posts

Friday 6 September 2019

How to disable SSH direct root login in AIX

In this post will discuss about to disable the direct root user login permanently. For security reasons you should not share the root password to others and however you can directly login from console either physical or virtual console.
Suppose if you have root password you can run commands whatever you want so in realtime this is not going to happen because SUDO will be implemented and direct root login has been disabled.
If you have are a oracle user you are authorised to run oracle related commands,files and directories

Step 1 : Take the backup of /etc/ssh/sshd_config file
# cp -rp /etc/ssh/sshd_config /etc/ssh/sshd_config_orgi

Step 2 : Disable "PermitRootLogin no" entry from /etc/ssh/sshd_config file. By default it mentioned as "yes" change it to "no"
# vi /etc/ssh/sshd_config

PermitRootLogin no

:wq!

save it

Step 3 : Stop the ssh services and again start the ssh services.To reflect the ssh changes.

# stopsrc -s sshd
# startsrc -s sshd

Note : Direct root login has been disbaled. If you want to login as a root two ways to login

1. Login from console its either physical or virtual
2. Login with your own user ID then switch to root
# ssh serverX@USERID
# su - root

Thanks for reading this Post

Privacy Policy

  Privacy Policy for UNIX TECH INFO At UNIX TECH INFO, accessible from https://unixworld4admin.blogspot.com/, one of our main priorities is ...