How to enable root login for server in Oracle
By default, server of Oracle does not allow root login via ssh. The default user is ubuntu
. Let do some changes to enable root login, which is much more convenient for me.
How to enable root login.
Open 22 port in Oracle management panel. You need to create a new Network security group and select them in your instance. For me, I open all ports.
Then log into your server as ubuntu
1
2
3
4
5sudo -i
apt update
apt upgrade
apt install vim
vim /etc/ssh/sshd_config1
2
3
4PermitRootLogin prohibit-password
PubkeyAuthentication yes
PasswordAuthentication no
PermitEmptyPasswords no1
vim .ssh/authorized_keys
1
2# delete the following
no-port-forwarding,no-agent-forwarding,no-X11-forwarding,command="echo 'Please login as the user \"ubuntu\" rather than the user \"root\".';echo;sleep 10;exit 142"1
service ssh restart
All done! Have fun with Linux!