skip to Main Content

sshtunnel is not using specified key and not using private key password – Mysql

I'm writing a script that needs to connect to a MySQL server via SSH. I have the following: import mysql.connector from sshtunnel import SSHTunnelForwarder def query_mysql_server(query): with SSHTunnelForwarder( ('ssh_server_ip', 22), ssh_username='sshuser', ssh_pkey='/Users/myhomedir/.ssh/id_rsa', ssh_private_key_password='my_ssh_key_passphrase', remote_bind_address=('127.0.0.1', 3306) ) as server: conn =…

VIEW QUESTION
Back To Top
Search