Oracle Cloud Infrastructure - General

Get Involved. Join the Conversation.


    anatoliy smirnov
    prompted for password using console connection to the...
    Topic posted November 14, 2019 by anatoliy smirnovGreen Ribbon: 100+ Points, tagged Classic 
    54 Views, 12 Comments
    prompted for password using console connection to the instance
    prompted for password using console connection to the instance


    When trying to connect to the free tier instance Linux 7.7 being prompted for user name / password.

    Created console connection to the instance (Linux 7.7 image) with public ip. Using Putty for ssh connection posts no issues. But trying to ssh connect using console connection from Win 7 with Powershell i am being prompted for the user name / password as below.


    PS C:\Users\ASMIRNOV> Start-Job { Echo N | plink.exe -i C:\Projects\Local\Cloud\Nov142019_2.ppk -N -ssh -P 443 -l ocid1.
    instanceconsoleconnection.oc1.iad.anuwcljtt2y3huqc4bluvmba2mxs43xkedmyolmqtxibwwby7tcxz5monhqa -L 22000:ocid1.instance.o
    c1.iad.anuwcljtt2y3huqc2ciolamuoo3g7e2iickfx3iwdedllwwonciprvmc5irq:22 };
    sleep 5; plink.exe -i C:\Projects\Local\Cloud\Nov142019_2.ppk -P 22000 localhost -l ocid1.instance.oc1.iad.anuwcljtt2y3h

    Id     Name            PSJobTypeName   State         HasMoreData     Location             Command
    --     ----            -------------   -----         -----------     --------             -------
    4      Job4            BackgroundJob   Running       True            localhost             Echo N | plink.exe -i...
    The server's host key does not match the one PuTTY has
    cached in the registry. This means that either the
    server administrator has changed the host key, or you
    have actually connected to another computer pretending
    to be the server.
    The new rsa2 key fingerprint is:
    ssh-rsa 4096 83:cf:09:81:b7:60:d0:05:0d:36:db:06:a3:fc:99:f4
    If you were expecting this change and trust the new key,
    enter "y" to update PuTTY's cache and continue connecting.
    If you want to carry on connecting but without updating
    the cache, enter "n".
    If you want to abandon the connection completely, press
    Return to cancel. Pressing Return is the ONLY guaranteed
    safe choice.
    Update cached key? (y/n, Return cancels connection) y
    Using username "ocid1.instance.oc1.iad.anuwcljtt2y3huqc2ciolamuoo3g7e2iickfx3iwdedllwwonciprvmc5irq".
    Access granted. Press Return to begin session.

    Login incorrect

    Please let me know if i may be missing something.







    • Alex_D_Oracle

      This works as expected in any linux instance :) 

      In order to bypass password authentication (because accounts don't have passwords set up by default), you need to boot into "maintenance mode" (need to modify the appropriate startup grub entry), the instructions on how to do that are under the "Troubleshooting Instances from Instance Console Connections" section here:


      • anatoliy smirnov

        Hi, thanks for the quick response.

        Tried this a couple of times, i don't seem to be able to edit the boot entry cause what i am seeing is this:


        [  447.339665] reboot: Power down
        2J←[01;01H←[0m←[37m←[40mSystem BootOrder not found.  Initializing defaults.
        Creating boot entry "Boot0001" with label "Oracle Linux" for file "\EFI\redhat\shimx64.efi"

        ←[0m←[30m←[40m←[2J←[01;01H←[0m←[37m←[40m←[21;07HUse the ^ and v keys to change the selection.
              Press 'e' to edit the selected item, or 'c' for a command prompt.   ←[04;80H ←[04;01H      Oracle Linux Server 7.7
         Rescue d50c95f453114d26aa9ae51d096c0e52 (4.14.35>
        ←[05←←←← ← ←[0m←[30m←[47m    Oracle Linux Server 7.7, with Unbreakable Enterprise Kernel 4.14.35-190>
        ←[06;01H←[0m←[37m←[40m←[05;79H←[06;01H      Oracle Linux Server (3.10.0-1062.4.1.el7.x86_64 with Linux) 7.7          ←[0
        6;79H←[07;01H      Oracle Linux Server (0-rescue-849ac1b86eb14df48e049d2634aeec7a with Linu>
        ←[08;01H←[07;79H←[08;01H                                                                               ←[08;79H←[09;01H
           ←[12;79H←[13;01H                                                                               ←[13;79H←[14;01H
                               ←[16;79H←[17;01H                                                                               ←[
        17;79H←[18;01H                                                                               ←[18;79H←[19;01H
                                                                            ←[19;79H←[19;80H ←[05;79H←[23;01H   The selected ent
        ry will be started automatically in 5s.                     ←[05;79H←[23;01H   The selected entry will be started automa
        tically in 4s.                     ←[05;79H←[23;01H   The selected entry will be started automatically in 3s.
                  ←[05;79H←[23;01H   The selected entry will be started automatically in 2s.                     ←[05;79H←[23;01
        H   The selected entry will be started automatically in 1s.                     ←[05;79H←[23;01H   The selected entry wi
        ll be started automatically in 0s.                     ←[05;79H←[0m←[30m←[40m←[2J←[01;01H←[0m←[37m←[40m←[0m←[30m←[40m←[2
        J←[01;01H←[0m←[37m←[40m[    1.906681] kvm: host does not support poll control
        [    1.911150] kvm: host upgrade recommended
        [    2.021506] Couldn't get size: 0x800000000000000e
        [    2.028103] MODSIGN: Couldn't get UEFI db list
        [    2.029864] Couldn't get size: 0x800000000000000e
        [    2.095665] Unable to open file: /etc/keys/x509_ima.der (-2)

        Welcome to ←[0;34mOracle Linux Server 7.7 dracut-033-564.0.5.el7 (Initramfs)←[0m!




        I am guessing there is a setting to format the screen output, correct fint , display etc... Do you know by chance what / where that setting is? Please let me know.



        • Alex_D_Oracle

          If I understand it well: you aren't able to stop the grub menu from running the default entry?

          Usually you can stop the countdown by pressing up or down keyboard arrows.

    • Alex_D_Oracle

      There is a "Formatted" text style (in the list of styles available when clicking the "Normal" button on top of the text editor). Interestingly, it will do the opposite: won't attempt to format the text :D

      If that doesn't work, you can paste the screenshots...

      • anatoliy smirnov

        Sorry, the text editor you mention - this is not in the PowerShell?

        The issue is that the screen output, in my case, is formatted in such a way that it is hard to read the entries, at the time when the process waits for me to select the grub entry, i am attaching the screen that should show what is happening, could you please have a look.

        I tried PowerShell and PowerShell ISE.

        I am thinking if this doesnt work for me i probably should switch to linux box and try ssh from there, i have dual boot on the laptop with Linux 6.9 i think

        Thanks again


        • Alex_D_Oracle

          Ok I understand that better now (I was thinking you had the difficulty pasting the text into this forum). I see now this is about what you see in powershell.

          It looks like this is a rather old version of windows?


          I suggest trying that from a linux VM or WSL (Windows subsystem for Linux)


        • Alex_D_Oracle

          just tried that on Windows 10 powershell, and the grub menu isn't accessible either. On linux should work fine though, you'll see the proper menu and will be able to stop the countdown with arrows.

          • anatoliy smirnov

            Sorry, i guess i am a bit hard these days )

            I have Win 7 and Win 10, tried both.

            Just tried on Linux 4.14.35-1818.3.3.el7uek.x86_64, i did generate the key first with ssh-keygen, then created console connection, used that pub key file, did copy what console connection has generated for me for ssh/linux, pasted into my console (all non root), i am getting this:

            asmirnov@asmirnov-linux ~]$

            [asmirnov@asmirnov-linux ~]$ ssh -o ProxyCommand='ssh -W %h:%p -p 443'


            Permission denied (publickey).

            ssh_exchange_identification: Connection closed by remote host

            Any idea what i am doing wrong?

            Should i may be check anything on the host side to make sure ssh can connect? Though i am thinking, since 'standard' putty session can connect it should be fine but who knows )

            Thanks much