---
title: How to Stream Audio Over SSH Using SoX
date: 2013-05-19T14:17:12+00:00
modified: 2013-05-19T14:17:12+00:00
permalink: https://kaspars.net/blog/stream-audio-sox-over-ssh
post_type: post
author:
  name: Kaspars
  avatar: https://reverse.kaspars.net/gravatar/avatar/92bfcd3a8c3a21a033a6484d32c25a40b113ec6891f674336081513d5c98ef76?s=96&d=mm&r=g
category:
  - Linux
---

# How to Stream Audio Over SSH Using SoX

I have a USB camera attached to a remote computer. To listen to its audio simply install [SoX](http://packages.debian.org/sid/sox) on the remote machine and locally (via MacPorts on OS X), and run the following command:

```
ssh XXX.XX.XX.XXX "sox -t alsa plughw:1,0 -p" | sox - -tcoreaudio
```

where `XXX.XX.XX.XXX` is the IP of the remote machine and `plughw:1,0` is an Alsa device name on that machine.