PDA

View Full Version : ssh/slimserver/softsqueeze



kkitts
2005-12-01, 21:39
Hi All,
I have slimserver 6.1.1 working with both a SB3 and with various computers running SoftSqueeze on my local LAN. I'd like to set up SoftSqueeze at work to access my slimserver at home. I have set up my firewall/router to forward port 22 to my linux box which runs slimserver. I then used Putty on my machine at work to connect through my firewall/router to make sure that I was able to ssh in to my linux/slimserver box at home. All of this works.

However, when I run SoftSqueeze on the computer at work (after typing in the IP of my WAN address listed in the router into the ssh section of prefs in SoftSqueeze) - it appears to take the username/password and start to connect - but then SoftSqueeze displays "Connection Failed. Please Check Server Settings". Can anyone provide any trouble-shooting hints, tips or techniques that might help? Also, is there any additional information that I could provide that would help one of you gain insight into what might be going on?

Thanks,

Kevin

dSw
2005-12-02, 11:35
Are you using public/private keys or just username/password?

Some people have reported problems with softsqueeze, however it worked for me when I tried the SSH-from-work setup recently. I was using keys for authentication.

You could always try setting up an SSH tunnel using PuTTY and configuring softsqueeze to connect to localhost.

PuTTY needs to forwards local ports 3483 and 9000 to your remote machine for this to work.

geoffb
2005-12-02, 12:33
On 12/1/05, kkitts <kkitts.1zebcn (AT) no-mx (DOT) forums.slimdevices.com> wrote:
>
> Hi All,
> I have slimserver 6.1.1 working with both a SB3 and with various
> computers running SoftSqueeze on my local LAN. I'd like to set up
> SoftSqueeze at work to access my slimserver at home. I have set up my
> firewall/router to forward port 22 to my linux box which runs
> slimserver. I then used Putty on my machine at work to connect through
> my firewall/router to make sure that I was able to ssh in to my
> linux/slimserver box at home. All of this works.
>
> However, when I run SoftSqueeze on the computer at work (after typing
> in the IP of my WAN address listed in the router into the ssh section
> of prefs in SoftSqueeze) - it appears to take the username/password and
> start to connect - but then SoftSqueeze displays "Connection Failed.
> Please Check Server Settings". Can anyone provide any trouble-shooting
> hints, tips or techniques that might help? Also, is there any
> additional information that I could provide that would help one of you
> gain insight into what might be going on?
>
> Thanks,
>
> Kevin

Secondarily to dSw's comments about forwarding the ports, if you are
using a Windows box at work then you might want to try using the
excellent (and free) Tunnelier:
http://www.bitvise.com/tunnelier.html

This does the SSH client work for you, as well as making the
configuration easy. Just make sure that it forwards 3483 and 9000
(and anything else you need). Then configure SoftSqueeze to connect
to 127.0.0.1, and it should work.

Other setup tips for this:
* You can set up pass-through forwarding ("S2C") to allow other
clients on your work network to browse the slim web pages, stream,
etc.

* You can enter the .jar filename to execute automatically when
tunnelier connects successfully

Also, you might want to choose an arbitrary high port number in place
of 22, if you don't want people banging against it with scripts every
hour of the day.

Cheers
Geoff

kkitts
2005-12-02, 13:42
I set up a session in putty and configured it to open 2 tunnels based on the ports that you have below. I can then activate this session in putty - I get a login prompt - and I can login using ssh to the slimserver/linux box. I assume that should authenticate me so that other processes like SoftSqueeze can use the tunnel.

I then ran SoftSqueeze - and what happens is quite interesting - the lights on my ethernet switch blink rapidly and the display on SoftSqueeze also blinks wildly/rapidly with a message that says:

"Problem: Lost contact with Slim Server. Check the software is running".

Weird, eh?

Kevin


Are you using public/private keys or just username/password?

Some people have reported problems with softsqueeze, however it worked for me when I tried the SSH-from-work setup recently. I was using keys for authentication.

You could always try setting up an SSH tunnel using PuTTY and configuring softsqueeze to connect to localhost.

PuTTY needs to forwards local ports 3483 and 9000 to your remote machine for this to work.

MrC
2005-12-02, 13:57
Have you changed softsqueeze to connect to localhost?

wei
2005-12-02, 15:23
It so happens I am setting up SoftSqueeze today as well. I am running openSSH and SlimServer 6.2.1 on Ubuntu Linux 5.10 (compiled from source) at home, where the uplink is about 700Kbps.

Then I set up a ssh tunnel to the slimserver using SSH Secure Shell on the PC at work, and open the stream http://localhost:9000/stream.mp3 in iTune. It plays beautifully for hours. The only downside is that I have to launch three applications on the PC in order to get the audio: ssh client, web browser (for remote control), and iTune.

So I installed Softsequeeze 2.2 to consolidate three applications to one. I first configured the built-in SSH client in SoftSqueeze. Everything connects fine but the sound started cut in and out after a few seconds. If I pause the audio for a few seconds and replay, the audio is good again but only for a few more seconds. At first, I thought it might have to do with the audio buffer size, so I increased it to 4096000 instead of the default 128000. But it does not have any noticable improvement.

Then I turned off the built-in SSH client and started a separate SSH client with tunneling, as suggested by some posts in the forum. The choppy sound problem still persists.

I don't think it's a network bandwidth problem, because I can stream the audio via SSH tunneling in iTune just fine. What could go wrong with the SoftSqueeze setup then?

gorstk
2005-12-02, 15:41
wei wrote:
> It so happens I am setting up SoftSqueeze today as well. I am running
> openSSH and SlimServer 6.2.1 on Ubuntu Linux 5.10 (compiled from
> source) at home, where the uplink is about 700Kbps.
>
> Then I set up a ssh tunnel using SSH Secure Shell to the slimserver on
> the PC at work, and open the stream http://localhost:9000/stream.mp3 in
> iTune. It plays beautifully for hours. The only downside is that I
> have to launch three applications on the PC in order to get the audio:
> ssh client, web browser (for remote control), and iTune.
>
> So I installed Softsequeeze 2.2 to consolidate three applications to
> one. I first configured the built-in SSH client in SoftSqueeze.
> Everything connects fine but the sound started cut and out after a few
> seconds. At first, I thought it might have to do with the audio buffer
> size, so I increased it to 4096000 instead of the default 128000. But
> it does not have any noticable improvement.
>
> Then I turned off the built-in SSH client and started a separate SSH
> client with tunneling, as suggested by some posts in the forum. The
> choppy sound problem still persists.
>
> I don't think it's a network bandwidth problem, because I can stream
> the audio via SSH tunneling in iTune just fine. What could go wrong
> with the SoftSqueeze setup then?

What music format are you trying to stream?

Using localhost:9000/stream.mp3 converts everything to a 320kbps

If you are streaming flac (which is what you would be doing if you are
sending anything other than an mp3 file to softsqueeze/SB2) the
bandwidth required is 3x that (~900kbps)

The way around it is to use the web interface --> player settings -->
audio --> bitrate limiting --> set to 320 (or lower if needed).

The other thing is that sending the players user interface (i.e. the
scrolling menus etc) takes bandwidth so you may want to reduce the
quality of this. player settings --> display --> scroll rate and scroll
pixels. I have mine set to 0.03, 0.03, 2 and 2 for my local LAN (makes
for much better display of scrolling than the defaults) however this
uses a lot of bandwidth. I do not know what the default settings are at
present as there was talk about increasing the quality of the defaul. (I
do not know how applicable these settings are for softsqueeze/SB2).

HTH

kkitts
2005-12-02, 16:27
I've tried both localhost and 127.0.0.1 in the SoftSqueeze prefs.


wei wrote:
> It so happens I am setting up SoftSqueeze today as well. I am running
> openSSH and SlimServer 6.2.1 on Ubuntu Linux 5.10 (compiled from
> source) at home, where the uplink is about 700Kbps.
>
> Then I set up a ssh tunnel using SSH Secure Shell to the slimserver on
> the PC at work, and open the stream http://localhost:9000/stream.mp3 in
> iTune. It plays beautifully for hours. The only downside is that I
> have to launch three applications on the PC in order to get the audio:
> ssh client, web browser (for remote control), and iTune.
>
> So I installed Softsequeeze 2

.2 to consolidate three applications to
> one. I first configured the built-in SSH client in SoftSqueeze.
> Everything connects fine but the sound started cut and out after a few
> seconds. At first, I thought it might have to do with the audio buffer
> size, so I increased it to 4096000 instead of the default 128000. But
> it does not have any noticable improvement.
>
> Then I turned off the built-in SSH client and started a separate SSH
> client with tunneling, as suggested by some posts in the forum. The
> choppy sound problem still persists.
>
> I don't think it's a network bandwidth problem, because I can stream
> the audio via SSH tunneling in iTune just fine. What could go wrong
> with the SoftSqueeze setup then?

What music format are you trying to stream?

Using localhost:9000/stream.mp3 converts everything to a 320kbps

If you are streaming flac (which is what you would be doing if you are
sending anything other than an mp3 file to softsqueeze/SB2) the
bandwidth required is 3x that (~900kbps)

The way around it is to use the web interface --> player settings -->
audio --> bitrate limiting --> set to 320 (or lower if needed).

The other thing is that sending the players user interface (i.e. the
scrolling menus etc) takes bandwidth so you may want to reduce the
quality of this. player settings --> display --> scroll rate and scroll
pixels. I have mine set to 0.03, 0.03, 2 and 2 for my local LAN (makes
for much better display of scrolling than the defaults) however this
uses a lot of bandwidth. I do not know what the default settings are at
present as there was talk about increasing the quality of the defaul. (I
do not know how applicable these settings are for softsqueeze/SB2).

HTH

wei
2005-12-02, 16:55
You are exactly right!

My music files are all stored in WAV format, 16-bit PCM 44.1KHz. So it would consume a little bit less 1.5Mbps bandwidth. I did not know that when streaming through iTune, slimserver does MP3 real-time encoding with 320K as the defalut bitrate, which explains why iTune plays the stream without any problem.

Once I scaled the bitrate to 320K in the player setting, everything works perfect now. I even changed the audio buffer back to the default 128000 without incurring any problem. I left the control user interface settings (scroll rate, etc) alone.

HTH, thank you so much! You made my day!

---Wei



What music format are you trying to stream?

Using localhost:9000/stream.mp3 converts everything to a 320kbps

If you are streaming flac (which is what you would be doing if you are
sending anything other than an mp3 file to softsqueeze/SB2) the
bandwidth required is 3x that (~900kbps)

The way around it is to use the web interface --> player settings -->
audio --> bitrate limiting --> set to 320 (or lower if needed).

The other thing is that sending the players user interface (i.e. the
scrolling menus etc) takes bandwidth so you may want to reduce the
quality of this. player settings --> display --> scroll rate and scroll
pixels. I have mine set to 0.03, 0.03, 2 and 2 for my local LAN (makes
for much better display of scrolling than the defaults) however this
uses a lot of bandwidth. I do not know what the default settings are at
present as there was talk about increasing the quality of the defaul. (I
do not know how applicable these settings are for softsqueeze/SB2).

HTH

gorstk
2005-12-02, 17:23
wei wrote:
> You are exactly right!
>
> My music files are all stored in WAV format, 16-bit PCM 44.1KHz. So it
> would consume a little bit less 1.5Mbps bandwidth. I did not know that
> when streaming through iTune, slimserver does MP3 real-time encoding
> with 320K as the defalut bitrate, which explains why iTune plays the
> stream without any problem.
>
> Once I scaled the bitrate to 320K in the player setting, everything
> works perfect now. I even changed the audio buffer back to the default
> 128000 without incurring any problem. I left the control user interface
> settings (scroll rate, etc) alone.
>
> HTH, thank you so much! You made my day!

Maybe you could add the above to the wiki? (wiki.slimdevice.com)?

MrC
2005-12-02, 17:34
kkits,

The large amount of sudden network activity you see is indicating to me that slimserver is rejecting your connections. SoftSqueeze hits the slimproto pretty hard, so you'll see hundreds of packets trying to make the connection.

Make sure on the Slim web under Server Settings->Security in the Allowed IP Addresses section you have added and saved the appropriate IP addresses from which you will be connecting. Since you're tunneling via you SSH server, it is your SSH server's IP address that must be allowed.

kkitts
2005-12-02, 20:14
Just figured out that my ssh tunnel works fine when both the client and server are inside the firewall at home. I guess the linksys firewall/router is doing something funny. Even though I can ssh to the slimserver/linux box from outside the firewall - for some reason then I come through the firewall the handshake between softsqueeze and the slimserver does not seem to work out.

BTW, I can see from /var/messages that the intial ssh login goes OK - something goes wrong after that...

I'm using a sshd that is on the same server as the slimserver. So when I do this from inside the firewall I can see that the IP of the slimserver player is 127.0.0.1.

I looked at the slimserver settings - but I am not blocking access from anywhere.

Darn... not sure how to fix this - would be interesting to swap in a different firewall/router. I never have liked the linksys stuff I've gotten - always had better luck with netgear stuff...

Kevin


kkits,

The large amount of sudden network activity you see is indicating to me that slimserver is rejecting your connections. SoftSqueeze hits the slimproto pretty hard, so you'll see hundreds of packets trying to make the connection.

Make sure on the Slim web under Server Settings->Security in the Allowed IP Addresses section you have added and saved the appropriate IP addresses from which you will be connecting. Since you're tunneling via you SSH server, it is your SSH server's IP address that must be allowed.

dSw
2005-12-03, 04:06
I set up a session in putty and configured it to open 2 tunnels based on the ports that you have below. I can then activate this session in putty - I get a login prompt - and I can login using ssh to the slimserver/linux box. I assume that should authenticate me so that other processes like SoftSqueeze can use the tunnel.

I then ran SoftSqueeze - and what happens is quite interesting - the lights on my ethernet switch blink rapidly and the display on SoftSqueeze also blinks wildly/rapidly with a message that says:

"Problem: Lost contact with Slim Server. Check the software is running".

Weird, eh?

Kevin

This is exactly the problem I had when trying to use PuTTY or Tunnelier to do the tunnelling. I couldn't figure it out so I just ended up using Softsqueeze for the tunnelling part.

I guessed it was the tunnel configuration in PuTTY/Tunnelier because the Softsqueeze tunnel worked ok.

kkitts
2005-12-03, 08:55
D'oh - I figured out what my problem was. When I configured my hardware firewall/router to port forward packets over to the sshd/slimserver linux box I only forwarded tcp packets - evidently SoftSqueeze needs for both TCP and UDP to be allowed through.

Thanks to everyone for your suggestions.

Kevin