"Address already in use" with autossh
kevin.Zhu 发布于:2022-6-6 18:55 分类:文摘 有 18 人浏览,获得评论 0 条
https://makandracards.com/makandra/1585-address-already-in-use-with-autossh
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.
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:
- 8080: The Port you want the tunnel to listen
- 5100: The Autossh Monitoring Port
- 5101: Autossh also uses the Monitoring Port +1