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

Certain flags do not work over ssh #85

Closed
jwhite007 opened this issue Mar 12, 2024 · 6 comments
Closed

Certain flags do not work over ssh #85

jwhite007 opened this issue Mar 12, 2024 · 6 comments

Comments

@jwhite007
Copy link

blueutil v2.9.1 installed via Homebrew on Sonoma 14.4

Firstly, I'd like to thank the developer(s) for this wonderful tool.

I've used blueutil in the past over ssh without issue. In fact, that is my main use case for blueutil. If I want to connect to a bluetooth device from a local mac but another mac in another room is connected, it's much easier just to ssh into that other mac and disconnect the bluetooth device so that I can connect on the local mac. For some reason, this latest version is not fully functional over ssh, though.

Of the flags that I've tried, the following do not work.

$ blueutil --paired  # returns nothing even when local it returns values
$ blueutil --connected  # returns nothing even when local it returns values
$ blueutil --disconnect <ID>   # hangs

the following works

$ blueutil -p
1
@toy
Copy link
Owner

toy commented Mar 12, 2024

Thank you and glad it was (and hopefully will be) useful!

I suspect that os privacy restrictions are causing this.
They are inherited from the ancestor which is the child of launchd, so for terminal you must have permission to use bluetooth, but not for sshd. If this is the case, you need to add sshd to the list and give it permission, then restart sshd and you should be able to have same access as from terminal.

@jwhite007
Copy link
Author

@toy ,

Thanks for the reply; however, it doesn't work for me.

Screenshot 2024-03-12 at 17 27 56

followed by:

$ sudo launchctl unload  /System/Library/LaunchDaemons/ssh.plist
$ sudo launchctl load -w /System/Library/LaunchDaemons/ssh.plist

@toy
Copy link
Owner

toy commented Mar 13, 2024

After some checking it maybe not sshd itself, but sshd-keygen-wrapper (/usr/libexec/sshd-keygen-wrapper) that you need to add and grant access to

@jwhite007
Copy link
Author

@toy ,

That did the trick. Thank you, sir, for all that you've done with blueutil.

@milindprajapati
Copy link

@toy

Thanks this helps. Although when I run inquiry, it get stuck and shows
2024-04-11 11:21:33.699 blueutil[6056:425757] -[IOBluetoothDeviceInquiry initWithDelegate:] - 0x600003244030
Would you be able to help me out?

@toy
Copy link
Owner

toy commented Apr 11, 2024

@milindprajapati I've answered in #60

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

3 participants