Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authenticatintg with SSH key instead of password? #458

Open
babaMar opened this issue Sep 24, 2024 · 0 comments
Open

Authenticatintg with SSH key instead of password? #458

babaMar opened this issue Sep 24, 2024 · 0 comments

Comments

@babaMar
Copy link

babaMar commented Sep 24, 2024

I'd like to authenticate to ClickHouse via SSH key instead of password. I already have multiple users that have been created without password (... IDENTIFIED BY ssh_key ...) that needs to run user and role creation statements.

I tried to use SSH tunnel, but the port 22 is not open on the ClickHouse server, so all I'm thinking is to replicate the native client behavior.

I tried this:

chc = Client(
    host='<host>',
    secure=True,
    user='<user>',
    keyfile='<myprivatekey>'
)

chc.execute('SHOW DATABASES')

which gives:

DB::Exception: securityadmin: Authentication failed: password is incorrect, or there is no user with such name.. Stack trace:

but I suspect that keyfile is for mutual TLS, not SSH authentication.

I could help with this if you can point me to the right direction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant