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

Connect via SSH using socket on remote machine #1266

Closed
alexkuc opened this issue Oct 28, 2021 · 13 comments
Closed

Connect via SSH using socket on remote machine #1266

alexkuc opened this issue Oct 28, 2021 · 13 comments
Labels
Feature Request New feature or request Low priority Lower priority items PR Welcome Issues and fixes available for wide community to help us move forward by creating a PR with solution stale

Comments

@alexkuc
Copy link
Contributor

alexkuc commented Oct 28, 2021

This is rather a question than a request specifically. I would like to connect via socket on remote SSH machine. Is this supported? When choosing SSH tab for connection type, I can see user/password fields but I believe it is not possible to specify socket?

@Jason-Morcos
Copy link
Member

This isn't supported by Sequel Ace for sure. I'm not sure if it's possible at all but I think probably not?

@Jason-Morcos Jason-Morcos added Feature Request New feature or request Won't Fix/Do This will not be worked on labels Oct 28, 2021
@alexkuc
Copy link
Contributor Author

alexkuc commented Oct 28, 2021

Why it wouldn't be supported in general? That's my home server is set up currently. I ssh into server as a user, say, xyz, type mysql and immediately logged into MySQL w/o prompting for a password. It's auth_socket plugin which is generally preferred over password due to better security.

@Jason-Morcos
Copy link
Member

Ace currently doesn't support it. I'd be happy to review a PR that adds support for it if someone writes it, but I think it's too niche a use-case to be a helpful feature for many users.

@alexkuc
Copy link
Contributor Author

alexkuc commented Oct 28, 2021

In that case maybe change tag from wontfix to pr-welcome?

@Jason-Morcos Jason-Morcos added Low priority Lower priority items PR Welcome Issues and fixes available for wide community to help us move forward by creating a PR with solution and removed Won't Fix/Do This will not be worked on labels Oct 28, 2021
@Jason-Morcos
Copy link
Member

Jason-Morcos commented Oct 28, 2021

That's fine. Generally the Wontfix tag is used to indicate issues the core team won't fix/do, but I'm okay removing it in this case.

@alexkuc
Copy link
Contributor Author

alexkuc commented Oct 28, 2021

Ah! I thought wontfix meant that if even PR is provided, it won't be considered.

@Jason-Morcos
Copy link
Member

No worries!
We review all PRs that are submitted, regardless of if there's an issue or not :)

@e-gaulue
Copy link

e-gaulue commented Nov 3, 2021

👍

Google shows more and more requests on it and it is supported by more and more clients (sequel pro).

As far as I've seen, doesn't look hard to do: create a kind of port forwarding but working with sockets instead of ports (so you need to provide the path to the remote sock):

ssh -L /tmp/local-mysql.sock:/var/run/mysqld/remote-mysqld.sock sshuser@remotehost
mysql -h localhost --protocol=SOCKET -S /tmp/local-mysql.sock -u'username' -p'mypassword'

Should be even easier than connect to a local server socket (due to sandbox limitation).

Sorry, I've have strictly no time to spend on it, I already work on too much projects.

Regards,

@e-gaulue
Copy link

e-gaulue commented Nov 3, 2021

Just tried from the command line, with the brew mariadb client and it works:

$ mariadb -h localhost --protocol=SOCKET -S /tmp/mysql.sock -u'pipo'
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 97
Server version: 10.5.12-MariaDB-0+deb11u1 Debian 11

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> exit
Bye

If I try through sequel while ssh unix socket tunnel is still active and giving the path of the socket: it doesn't work.
Capture d’écran 2021-11-03 à 15 00 42
Capture d’écran 2021-11-03 à 15 03 24

Shame...

@Jason-Morcos
Copy link
Member

Just tried from the command line, with the brew mariadb client and it works:


$ mariadb -h localhost --protocol=SOCKET -S /tmp/mysql.sock -u'pipo'

Welcome to the MariaDB monitor.  Commands end with ; or \g.

Your MariaDB connection id is 97

Server version: 10.5.12-MariaDB-0+deb11u1 Debian 11



Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.



Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.



MariaDB [(none)]> exit

Bye

If I try through sequel while ssh unix socket tunnel is still active and giving the path of the socket: it doesn't work.

Capture d’écran 2021-11-03 à 15 00 42

Capture d’écran 2021-11-03 à 15 03 24

Shame...

This comment isn't related to connecting via SSH and hence is not relevant to this issue. Please see the more general socket issue instead #113. This issue is a feature request for remote socket support.

@e-gaulue
Copy link

e-gaulue commented Nov 3, 2021

Yes it may. I read #113 too fast and thought it was a file access trouble when trying to access a local mysql server instance socket. As I though I was in another context, I gave it a try. Indeed, it looks to be a larger access trouble.

As I said, I'm really not specialised in Xcode devs, but it would look strange to me a process can't access a socket it creates itself. As far as I understand in #113, people tries to access an existant socket. But maybe, in this context: "Sequel create itself the socket as a remote ssh socket and then consume it", it would work. I don't know exactly what sandboxes imply.

Regards,

@stale
Copy link

stale bot commented Dec 7, 2021

This issue has been marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale label Dec 7, 2021
@stale
Copy link

stale bot commented Dec 15, 2021

This issue has been auto-closed because there hasn't been any activity for at least 35 days. However, we really appreciate your contribution, so thank you for that! 🙏 Also, feel free to open a new issue if you still experience this problem 👍.

@stale stale bot closed this as completed Dec 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request New feature or request Low priority Lower priority items PR Welcome Issues and fixes available for wide community to help us move forward by creating a PR with solution stale
Projects
None yet
Development

No branches or pull requests

3 participants