Read more

"Address already in use" with autossh

Kim Klotz
September 12, 2011Software engineer at makandra GmbH

If you get an error "Adress already in use" with autossh check with lsof or netstat if something already listen on the Ports you want to use.

Illustration web development

Do you need DevOps-experts?

Your development team has a full backlog? No time for infrastructure architecture? Our DevOps team is ready to support you!

  • We build reliable cloud solutions with Infrastructure as code
  • We are experts in security, Linux and databases
  • We support your dev team to perform
Read more Show archive.org snapshot

There are three Ports you have to look at. If your Command look like this:

/usr/local/bin/autossh -f -M 5100 -g -N -C -L 8080:127.0.0.1:80 example.com -i ~/.ssh/id_rsa -l user

The following three ports need to be available:

  1. 8080: The Port you want the tunnel to listen
  2. 5100: The Autossh Monitoring Port
  3. 5101: Autossh also uses the Monitoring Port +1
Posted by Kim Klotz to makandra dev (2011-09-12 10:42)