How to stream remote MP3 files over ssh

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.

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

When prompted for SSH password, enter the password. MP3 streaming will then start.

Download this article as ad-free PDF (made possible by your kind donation): 
Download PDF

Subscribe to Ask Xmodulo

Do you want to receive Linux related questions & answers published at Ask Xmodulo? Enter your email address below, and we will deliver our Linux Q&A straight to your email box, for free. Delivery powered by Google Feedburner.

Support Xmodulo

Did you find this tutorial helpful? Then please be generous and support Xmodulo!

One thought on “How to stream remote MP3 files over ssh

Leave a comment

Your email address will not be published. Required fields are marked *