-
Notifications
You must be signed in to change notification settings - Fork 662
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
Connect using a SSH transport #634
Conversation
Codecov Report
@@ Coverage Diff @@
## master #634 +/- ##
==========================================
- Coverage 78.05% 78.02% -0.04%
==========================================
Files 26 26
Lines 2297 2334 +37
==========================================
+ Hits 1793 1821 +28
- Misses 504 513 +9
Continue to review full report at Codecov.
|
mycli/sqlexecute.py
Outdated
|
||
if ssh_host and paramiko: | ||
if not ssh_user: | ||
ssh_user = getpass.getuser() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@meeuw It looks like paramiko will already call getpass.getuser()
if the username is None
. So, maybe we don't need this on the mycli side?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, you're right.
9c77b12
to
62dd759
Compare
27459eb
to
dad423a
Compare
dad423a
to
5547730
Compare
@meeuw I'm not sure exactly what my issue is, but I can't get this to work on python 2.7 or 3.6. I get an error @grooverdan mentions that PR is required on a PyMySQL issue: PyMySQL/PyMySQL#77 |
That's stange! I presume you're testing this on MacOS? Have you tried running it on Linux? |
@meeuw Yeah, that was tested on Linux (both a Linux client and a Linux server). I just tested a MacOS client connecting to a Linux SSH server and that worked fine. I'm going to do some more testing with some Linux boxes real quick. |
@meeuw Okay, everything continues to work well on the MacOS computer. On the Linux servers I got a variety of errors, some of which I think are related to the ssh server configuration. I'm not too worried about that at this point. One thing we might want to improve (not in this pull request) is that I added a couple of changes to the click help messages. I do think we should add paramiko to the |
Yes, it's a good idea to add an optional name in |
Description
Connect using a SSH transport
This only works when paramiko is installed, I don't know if we want to hard depend on paramiko (with all it's dependencies).
Checklist
changelog.md
.AUTHORS
file (or it's already there).