Thank you for supporting the Cloud Customer Connect Community in 2024. It's a gift to work with you!

Look back
You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

OCI: “no-port-forwarding, no-agent-forwarding, no-X11-forwarding" in root user authorized_keys

edited Mar 18, 2024 10:00AM in Linux

Applies  to :  

Oracle Cloud Infrastructure - Version N/A and later

Linux x86-64

Goal 

In OCI Oracle Linux platform  image instances, the file /root/.ssh/authorized_keysis automatically updated to contain the following:

no-port-forwarding, no-agent-forwarding, no-X11-forwarding, command="echo 'Please login as the user \"opc\" rather than the user \"root\".';echo;sleep 10"<public-key may be present here> 

Solution

For security reasons, the root user in OCI Oracle Linux systems is not enabled for SSH login. In the same sense, it should be avoided to setup an SSH key for  the root user in /root/.ssh/authorized_keys

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!