7 Replies Latest reply on Nov 20, 2019 10:22 AM by AndyPol

    SSH tunneling not working after upgrade to 19.2

    martinbn

      Hi

       

      After upgrading sqlcl and SQLDeveloper from version 19.1 to 19.2 - the SSH tunnels are not working (not not sqlcl and not in SQLDeveloper).

      The error message is : "No more authentication methods available".

       

      I am on a Mac, with Java version:

      java version "11.0.4" 2019-07-16 LTS

      Java(TM) SE Runtime Environment 18.9 (build 11.0.4+10-LTS)

      Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.4+10-LTS, mixed mode)

       

      The tunnel is working fine still on my SQL Developer 19.1.

       

      Any hints ?

      Brgds

      Martin

        • 1. Re: SSH tunneling not working after upgrade to 19.2
          thatJeffSmith-Oracle

          Regen your keys to be for OpenSSH, version 19.2 doesn’t support PuTTYgen keys – I’m in the process of updating the release notes to address this. 

          • 2. Re: SSH tunneling not working after upgrade to 19.2
            martinbn

            Thanks Jeff, will try that.

            brgds

            Martin

            • 3. Re: SSH tunneling not working after upgrade to 19.2
              peter_raganitsch

              Hi Jeff,

               

              could you elaborate on that? What has been changed and what are the necessary steps I need to take?

               

              Thank you,

               

              Peter

              • 4. Re: SSH tunneling not working after upgrade to 19.2
                AndyPol

                Jeff I regenerated key (exported as OpenSSH)... didn't help.
                Can you help what to do ?

                • 5. Re: SSH tunneling not working after upgrade to 19.2
                  Richard Soule

                  Jeff,

                   

                  I'm in the same boat...

                   

                  In 19.1 stuff just worked.

                   

                  In 19.2 I get "No more authentication methods available" error.

                   

                  So, on a Windows box, I do this:

                   

                  Take my old private key that SQL Developer used just fine in 19.1. Import that key into PuttyGen. Using the Conversions menu, choose either a) Export OpenSSH key or b) Export OpenSSH key (force new format).

                   

                  Point SQL Developer 19.2 at this new key. Same error...

                   

                  Generate a new key using PuttyGen. Export the private key using either a or b from before.

                   

                  Copy and paste the text from the "Public Key for pasting into OpenSSH authorized_keys file" window directly into a file on the server (Oracle Linux on Oracle Cloud). Put this content into the Linux Server user's authorized_keys file in that user's .ssh directory.

                   

                  Point SQL Developer at the exported OpenSSH format key (either one). Attempt to connect, same error...

                   

                  More details: Windows 10 client machine. Using SQL Developer 19.2 with the embedded JDK. Server is Oracle Linux 7 serveron Oracle cloud. Bastion host that connects to DBaaS. User account on the server is sshforward user created specifically to do SSH forwards (that worked just fine in the 19.1 release of SQL Developer).

                  • 6. Re: SSH tunneling not working after upgrade to 19.2
                    Richard Soule

                    Solved, at least on Windows 10.

                     

                    OK.... Windows 10 has ssk-keygen as a 'native command'.

                     

                    Apparently the private key file that I was using with SQL Developer 19.1 was generated as an OpenSSH key, but it had this format:

                     

                     

                    -----BEGIN RSA PRIVATE KEY-----

                    Proc-Type: 4,ENCRYPTED

                    DEK-Info: AES-128-CBC,BLAHBLAHBLAHBLAHBLAH

                     

                     

                    BLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAH

                    [SNIP]

                    BLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAH

                    -----END RSA PRIVATE KEY-----

                     

                    I then did this in the directory where my old id_rsa file was:

                     

                    ssh-keygen -e -f id_rsa > id_rsa_openssh

                    Enter passphrase:

                     

                    id_rsa_openssh looks like this:

                     

                    ---- BEGIN SSH2 PUBLIC KEY ----

                    Comment: "2048-bit RSA, converted by rich@ROTOR from OpenSSH"

                    BLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAH

                    [SNIP]

                    BLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAH

                    ---- END SSH2 PUBLIC KEY ----

                     

                    AND IT WORKED!!!!

                     

                    So, question: Is this because I'm an idiot and didn't know that "Generate your key in OpenSSH format" really meant that I needed an OpenSSH2 public key that had been converted from a private key?

                     

                    I have to admit, I'm still confused. But since it now works just fine, I'll move on... I guess.

                    • 7. Re: SSH tunneling not working after upgrade to 19.2
                      AndyPol

                      Hi Richard

                       

                      I did the same but without success : (

                       

                      I have generally strange situation.

                      SQL Developer 19.1

                      Everything works properly. Can connect to all instances.

                       

                      SQL Developer 19.2
                      I can't connect via SQL Developer SSH to my old Oracle OCI instance (created on begining 2019)

                       

                       

                      but I can connect to my last instances (created about 1 month ago).

                       

                      Putty or Windows 10 native OpenSSH
                      I can connect to all instances.