metropolis-ameer opened a new issue, #24180:
URL: https://github.com/apache/superset/issues/24180

   SSH only accepts RSA keys.  Using ed25519 key fails with Error unpack 
requires 4 bytes.
   <img width="455" alt="image" 
src="https://github.com/apache/superset/assets/62971911/0b59a9cc-b18e-48dc-82b9-c643063a9762";>
   
   
   #### How to reproduce the bug
   
   Generate ed25519 key.
   ```ssh-keygen -t ed25519 -C "[email protected]"```
   
   Create new database connection in Superset UI.
   
   Use the key with an SSH connection.
   
   ### Expected results
   
   Connection Success
   
   ### Actual results
   
   Error: unpack requires 4 bytes.
   
   #### Screenshots
   
   <img width="455" alt="image" 
src="https://github.com/apache/superset/assets/62971911/0b59a9cc-b18e-48dc-82b9-c643063a9762";>
   
   
   ### Environment
   
   - browser type and version: Chrome
   - superset version: 2.1.0
   - python version: python 3.8
   - any feature flags active: SSH_TUNNELING
   
   ### Checklist
   
   Make sure to follow these steps before submitting your issue - thank you!
   
   - [x ] I have checked the superset logs for python stacktraces and included 
it here as text if there are any.
   - [ x] I have reproduced the issue with at least the latest released version 
of superset.
   - [ x] I have checked the issue tracker for the same issue and I haven't 
found one similar.
   
   ### Additional context
   
   Looking at like 64 of ssh.py I see I referencing RSAKey.from_private_key.
   ```
           if ssh_tunnel.password:
               params["ssh_password"] = ssh_tunnel.password
           elif ssh_tunnel.private_key:
               private_key_file = StringIO(ssh_tunnel.private_key)
               private_key = RSAKey.from_private_key(
                   private_key_file, ssh_tunnel.private_key_password
               )
   ```
   I don't know enough about python or SSH to fix this myself unfortunately as 
how do you identify a key type from a pasted value?  Is this something where 
you try each type and hope one succeeds or provide a dropdown to identify the 
key type?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to