Python Forum
[PyQt] SSH port forwarding and connection to SQL Server in separate threads freezes
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[PyQt] SSH port forwarding and connection to SQL Server in separate threads freezes
#7
What I am trying to achieve is to connect my application - that can be used by more than just one person - to host where there is the instance of SQL Server. For security reasons I am using SSH to connect to host itself and within SSH connection I am performing port forwarding so the connection to SQL Server can be made via localhost nad local port. Then the connection to SQL Server is used to perform different SQL queries.

As I said before I can bypass the built-in mechanism to connect to host via SSH and establish port forwarding by using PuTTY (in that case I need only connection to SQL server built in my app). And such solution is workable. I wanted however to incorporate single point where user has to log in rather than start first provide password at start with Pageant, then either start PuTTY or execute Saved Session from Pageant and then to provide login and password to connect to database. The rsa keys that are used to connect to host via SSH can also be used to encrypt the SQL Server user and password so at the end of the day the application user has just to provide the name of the RSA private key and password.

As you can see from the code I have attached. The parts that allows to:
- connect to external host via SSH
- establish the port forwarding connection
- establish connection to SQL Server
are ready and they are working in separation. The problem is to run all of them within single app.
Reply


Messages In This Thread
RE: SSH port forwarding and connection to SQL Server in separate threads freezes - by jan_pips - Nov-05-2019, 10:19 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  GUI freezes while executing a callback funtion when a button is pressed abi17124 5 7,546 Jul-10-2019, 12:48 AM
Last Post: FullOfHelp
  [Tkinter] tkinter freezes by clicking button Zatox11 33 26,045 Apr-10-2018, 09:03 AM
Last Post: Zatox11
  Running telnet loop freezes GUI reedhallen 1 3,482 Jan-27-2018, 10:24 PM
Last Post: j.crater
  Clock freezes - wx.python glib problem strongheart 3 4,078 Oct-10-2017, 03:36 AM
Last Post: strongheart

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020