Containers and Kubernetes

Get Involved. Join the Conversation.

Topic

    John K
    SSH console access loginAnswered
    Topic posted September 9, 2019 by John K 
    51 Views, 3 Comments
    Title:
    SSH console access login
    Content:

    I'm trying to SSH into my instance using the SSH connection string provided by the console. I uploaded my public key and changed the permission of the private key ($ chmod 600 ~./.ssh/id_rsa) but I'm still being asked for username and password. Any ideas as to what this would be or how I can get past this?

    Best Comment

    Ben Haworth

    Hi - presuming you mean log in to your compute instance (perhaps worker node?) via the Console Connection then this prompt for username/password is to be expected. 

    If you are working with the OCE service, unless you have done something very bad to a worker node, you shouldn't need to use the Console Connection and should be able to SSH directly to the IP of the worker node - see here: https://docs.cloud.oracle.com/iaas/Content/ContEng/Tasks/contengconnectingworkernodesusingssh.htm

    The SSH key you uploaded is used to authenticate you against the Console Connection service, which then provides you with a remote session to the Console of the Operating System.  You then need to authenticate against the OS, which is why you are getting a username and password prompt.  If you have not set up a user with local login rights in the OS (or changed/set the OPC user password etc) then you will not be able to log in - at this point the only use for the console connection is by rebooting the instance, you can enter the boot up commands to GRUB, or whatever, to launch maintenance mode and edit the system files to set up a user etc.  More details here:

    https://docs.cloud.oracle.com/iaas/Content/Compute/References/serialconsole.htm#four

    Hope that helps.
    Ben

    Comment

     

    • Ben Haworth

      Hi - presuming you mean log in to your compute instance (perhaps worker node?) via the Console Connection then this prompt for username/password is to be expected. 

      If you are working with the OCE service, unless you have done something very bad to a worker node, you shouldn't need to use the Console Connection and should be able to SSH directly to the IP of the worker node - see here: https://docs.cloud.oracle.com/iaas/Content/ContEng/Tasks/contengconnectingworkernodesusingssh.htm

      The SSH key you uploaded is used to authenticate you against the Console Connection service, which then provides you with a remote session to the Console of the Operating System.  You then need to authenticate against the OS, which is why you are getting a username and password prompt.  If you have not set up a user with local login rights in the OS (or changed/set the OPC user password etc) then you will not be able to log in - at this point the only use for the console connection is by rebooting the instance, you can enter the boot up commands to GRUB, or whatever, to launch maintenance mode and edit the system files to set up a user etc.  More details here:

      https://docs.cloud.oracle.com/iaas/Content/Compute/References/serialconsole.htm#four

      Hope that helps.
      Ben

      • John K

        Thanks Ben! I guess I was confused because I was using the SSH command provided but in fact I could login with 

        ssh -i ~/.ssh/id_rsa opc@<my.cloud.ap.address>. Appreciate the response!

    • Joydeepta Bhattacharjee

      Yes, to connect and SSH to your worker node you have your opc user and password set against in OCI node provisioned.