How to stream remote MP3 files over SSH

Last updated on June 7, 2020 by Dan Nanni

Question: I have a lot of MP3 files stored on a remote server, and I want those MP3 files streamed over the network to a local media player (e.g., VLC or mplayer). What is an easy way to stream remote MP3 files over the network?

Assuming that the remote server is running an SSH server, and that multiple MP3 files are stored in /home/dev/mp3/ on the remote server, you can use the following command to stream the remote MP3 files to local mplayer over SSH.

$ ssh dev@remote_server cat /home/dev/mp3/* | mplayer -

If you are using VLC player, you can use the following command instead. Note that the cvlc command is VLC without user interface.

$ ssh dev@remote_server cat /home/dev/mp3/* | cvlc -

When prompted for SSH password, enter the password. Alternatively, you can set up SSH key authentication. After successful SSH login, MP3 streaming will start.

Support Xmodulo

This website is made possible by minimal ads and your gracious donation via PayPal or credit card

Please note that this article is published by Xmodulo.com under a Creative Commons Attribution-ShareAlike 3.0 Unported License. If you would like to use the whole or any part of this article, you need to cite this web page at Xmodulo.com as the original source.

Xmodulo © 2021 ‒ AboutWrite for UsFeed ‒ Powered by DigitalOcean