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

'Channel' object has no attribute 'getsockopt' when connecting with SSL through a jump server #1176

Open
amne opened this issue Nov 8, 2024 · 0 comments

Comments

@amne
Copy link

amne commented Nov 8, 2024

I'm trying to connect to an Amazon RDS MySQL 8 instance through a jump server with IAM ROLE.

$ docker run -it -v ~:/home/amne ccruceru/mycli \
 --ssh-user ccruceru\
 --ssh-host jump-server-example.net\
 --ssh-key-filename ~/.ssh/id_rsa\
 mysql://iam_usr@engine8-db-databasecluster.cluster-blabla.us-east-1.rds.amazonaws.com\
 -p $TOKEN\
 --ssl-verify-server-cert

But this command fails with a simple error message (no stack trace is printed):

'Channel' object has no attribute 'getsockopt'

My understanding is that with "--ssl-verify-server-cert" it should try to pass the token in cleartext which is required for IAM auth (source #550 (comment) .)

Connecting without SSL but with a traditional user that exists in mysql.user and native password works fine.

Here is the docker file:

FROM python:3.9.15-bullseye

RUN pip3 install paramiko PyMySQL==1.0.2 mycli==1.27.2 \
    && apt-get update \
    && apt-get install -y less locales \
    && locale-gen en_US.UTF-8 \
    && apt-get clean autoclean \
    && apt-get autoremove --yes \
    && rm -rf /var/lib/{apt,dpkg,cache,log}/

ADD docker-entrypoint.sh /usr/local/bin/

ENTRYPOINT ["docker-entrypoint.sh"]

CMD ["mycli"]
docker build -t ccruceru/mycli .
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