Forwarding audio output over SSH from one Debian 13 GNOME machine to another involves using PulseAudio, which is the default sound server in GNOME. Here’s a step-by-step guide to achieve this:
This is the machine where the audio is being generated.
Edit the PulseAudio configuration file:
bashsudo nano /etc/pulse/default.pa
Add or uncomment the following lines:
plaintextload-module module-native-protocol-tcp auth-ip-acl=127.0.0.1;192.168.1.0/24 load-module module-zeroconf-publish
Replace 192.168.1.0/24 with the IP range of your local network if needed.
Restart PulseAudio:
bashpulseaudio -k && pulseaudio --start
Edit the PulseAudio daemon configuration:
bashsudo nano /etc/pulse/daemon.conf
Ensure the following line is uncommented and set:
plaintextexit-idle-time = -1
Restart PulseAudio again:
bashpulseaudio -k && pulseaudio --start
This is the machine where you want to hear the audio.
pulseaudio-utils (if not installed)bashsudo apt install pulseaudio-utils
Run the following command to forward the PulseAudio port (4713) over SSH:
bashssh -R 4713:localhost:4713 user@remote-machine-ip
Replace user and remote-machine-ip with the appropriate values.
On the local machine, set the PULSE_SERVER environment variable to use the tunneled PulseAudio server:
bashexport PULSE_SERVER=tcp:localhost:4713
To make this persistent, add the line to your ~/.bashrc or ~/.profile file.
Play an audio file or run an application on the remote machine. The audio should now be played on your local machine.
auth-ip-acl setting in /etc/pulse/default.pa.bashpulseaudio -k && pulseaudio --start
paprefs (GUI)If you prefer a GUI, install paprefs on the remote machine:
bashsudo apt install paprefs
Open paprefs, go to the Network Server tab, and enable Enable network access to local sound devices. Configure the allowed IP range as needed.