I need to use haproxy to load-balance SFTP connections but currently i cannot bind it to port 22 (cutomer constraint). Can i bind to port xxx and listen on port 22 to achieve this or must I bind to 22?
Thanks
I need to use haproxy to load-balance SFTP connections but currently i cannot bind it to port 22 (cutomer constraint). Can i bind to port xxx and listen on port 22 to achieve this or must I bind to 22?
Thanks
The bind and listen are not the same things nor things that can be done independently. They are consequent stages on the same port number. It is well described in this diagram from Wikipedia:
You can expose SSH on any port you desire. The clients must be aware of that, however.
listen ssh-balanced
bind <public-ip>:5022
mode tcp
server term01 <internal-ip1>:22 check
server term02 <internal-ip2>:22 check
You need to use ssh -p5022
to connect, and scp -P5022
etc.