Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am using autossh to tunnel my http traffic (and some other things) through a ssh tunnel, this works great, but when my isp kicks me out (this happens all 24 hours), then I get the following error in my ssh auth.log on the server side:

Aug  5 18:20:00 <hidden> sshd[3297]: error: bind: Address already in use
Aug  5 18:20:45 <hidden> sshd[3318]: error: bind: Address already in use
Aug  5 18:21:30 <hidden> sshd[3337]: error: bind: Address already in use
Aug  6 18:49:40 <hidden> sshd[5122]: error: bind: Address already in use
Aug  6 18:50:25 <hidden> sshd[5155]: error: bind: Address already in use
Aug  6 18:51:10 <hidden> sshd[5202]: error: bind: Address already in use
Aug  6 18:51:55 <hidden> sshd[5237]: error: bind: Address already in use
Aug  6 18:52:40 <hidden> sshd[5280]: error: bind: Address already in use
Aug  6 18:53:25 <hidden> sshd[5313]: error: bind: Address already in use
Aug  6 18:54:10 <hidden> sshd[5354]: error: bind: Address already in use
Aug  6 18:54:55 <hidden> sshd[5387]: error: bind: Address already in use
Aug  6 18:55:40 <hidden> sshd[5434]: error: bind: Address already in use
Aug  6 18:56:25 <hidden> sshd[5467]: error: bind: Address already in use
Aug  6 18:57:10 <hidden> sshd[5509]: error: bind: Address already in use
Aug  6 18:57:55 <hidden> sshd[5545]: error: bind: Address already in use
Aug  6 18:58:40 <hidden> sshd[5588]: error: bind: Address already in use
Aug  6 18:59:25 <hidden> sshd[5619]: error: bind: Address already in use
Aug  6 19:00:10 <hidden> sshd[5687]: error: bind: Address already in use
Aug  6 19:00:55 <hidden> sshd[5708]: error: bind: Address already in use
Aug  6 19:01:40 <hidden> sshd[5731]: error: bind: Address already in use
Aug  6 19:02:25 <hidden> sshd[5744]: error: bind: Address already in use
Aug  6 19:03:10 <hidden> sshd[5767]: error: bind: Address already in use
Aug  6 19:03:55 <hidden> sshd[5780]: error: bind: Address already in use
Aug  6 19:04:40 <hidden> sshd[5804]: error: bind: Address already in use
Aug  6 19:05:25 <hidden> sshd[5817]: error: bind: Address already in use

Is there any solution to fix that problem? It's really annoying, especially when you use that tunnel in a IRC client, and you get kicked out all 30 seconds, because of that incident.

My script to connect to the server is:

#!/bin/sh
AUTOSSH_LOGFILE=ssh_proxy.log
AUTOSSH_FIRST_POLL=30
AUTOSSH_POLL=30
autossh -f -D 0.0.0.0:41414 <hidden>@<hidden> -N -o "ServerAliveInterval 60" -o "ServerAliveCountMax 3"

As you can see it uses random ports, but not for every connection, but I need a random port for every connection, so I can get rid of the bind error.

Is there any solution for this?

share|improve this question
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.