datafe / sqltools-hive-vscode-extension

This is a SQLTools plugin to integrate with Hive. Providing for running Hive SQL and getting results, SQL formatting, generating SQL statements and SQL completion.
MIT License
2 stars 0 forks source link

Support ssh tunneling to jump box or bastion host #4

Open alberttwong opened 3 months ago

alberttwong commented 3 months ago

Many times, you cannot connect directly to EMR. You need to connect a jump box / bastion and then from there access the private internal IP.

Your tool doesn't support this scenario. Currently using https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-ssh for SSH tunneling. Here's an article on how to set it up. https://medium.com/@christyjacob4/using-vscode-remotely-on-an-ec2-instance-7822c4032cff

Screenshot 2024-07-18 at 4 09 25 PM

Screenshot 2024-07-18 at 4 10 01 PM

alberttwong commented 3 months ago

This is how dbeaver does it.

Screenshot 2024-07-18 at 4 24 20 PM Screenshot 2024-07-18 at 4 24 10 PM

alberttwong commented 3 months ago

This should work but I hit the password issue.

ssh -N ec2-user@ec2-13-57-190-164.us-west-1.compute.amazonaws.com -L 10000:internal-a369003b390fb40179c49fd47047cd30-1497762862.us-west-1.elb.amazonaws.com:10000
samuelhsin commented 2 months ago

This extension only connects directly to hive hosts under the same LAN and does not considers SSH scenarios. I'll try to implement codes by your recommends, thanks.

alberttwong commented 2 months ago

Let me know when this creature is out and I can help test