We are running automated tests from command line. The tests are using a python library to control a sound card to play and record audio. The tests work fine when launched locally in the terminal of the Mac that is running the tests, but when we run the tests via Jenkins, or just by logging in via ssh and launching the tests, audio playback works, but recording just records "empty" (recording appears for expected duration, but it is silent)

In system settings we can set the microphone permissions for applications, such as Terminal or Audacity, but not for ssh connection.

So is there any workaround to get the sound recording to work in ssh connection?

  • Did you give permissions to /usr/bin/ssh-agent?
    – JMY1000
    Oct 19, 2023 at 9:42
  • No. Please guide me how to do that?
    – japi1
    Oct 19, 2023 at 12:22
  • Ah dangit, it looks like I was mistaken, you can't use System Preferences/tccutil to add microphone permissions. You could maybe create a companion app on behalf of the sshd daemon, or configure an audio server to forward the mic audio, but I'm not 100% sure on which way would be appropriate.
    – JMY1000
    Oct 19, 2023 at 19:05


You must log in to answer this question.

Browse other questions tagged .