Ssh load-balancing

Hi,

Im new to nginx and am trying to load-balance ssh sessions to an
autoscaling group of ECS instances in AWS.

Having trouble getting my config files right. I dont get any errors on
startup, but my access.logs shows this lines for each attempt and the
command line gives me this :

ssh [email protected]

ssh_exchange_identification: Connection closed by remote host

Access.log:

10.172.200.18 - - [31/Jul/2015:15:54:15 +0000] “SSH-2.0-OpenSSH_6.2” 400
173 “-” “-” “-”

10.172.200.18 - - [31/Jul/2015:16:25:31 +0000] “SSH-2.0-OpenSSH_6.2” 400
173 “-” “-” “-”

10.172.200.18 - - [31/Jul/2015:16:34:31 +0000] “SSH-2.0-OpenSSH_6.2” 400
173 “-” “-” “-”

Any direction would be appreciated.

Thanks, Jerry

Jerome (Jerry) Wyman
Technical Consultant
(207) 751-6613
[email protected]

This communication is Confidential Information. By using this message
and attachments you implicitly consent to terms and conditions set forth
at http://www.taos.com/email_disclaimer. If you do not consent or
received this message in error, please destroy it.

Hello!

On Fri, Jul 31, 2015 at 05:05:22PM +0000, Jerry Wyman wrote:

Access.log:

10.172.200.18 - - [31/Jul/2015:15:54:15 +0000] “SSH-2.0-OpenSSH_6.2” 400 173 “-”
“-” “-”

10.172.200.18 - - [31/Jul/2015:16:25:31 +0000] “SSH-2.0-OpenSSH_6.2” 400 173 “-”
“-” “-”

10.172.200.18 - - [31/Jul/2015:16:34:31 +0000] “SSH-2.0-OpenSSH_6.2” 400 173 “-”
“-” “-”

Any direction would be appreciated.

Looks you are trying to balance ssh connections using http module.
This won’t work, as http is only able to balance http requests,
not arbitrary connections.

If you want to balance ssh connections, try using the stream
module instead:

http://nginx.org/en/docs/stream/ngx_stream_core_module.html

The stream module is designed to balance arbitrary connections,
and should work for you.

This communication is Confidential Information. By using this
message and attachments you implicitly consent to terms and
conditions set forth at http://www.taos.com/email_disclaimer. If
you do not consent or received this message in error, please
destroy it.

By posting to this list you’ve agreed that the message will be
publicly available. If you want your messages to be confidential,
please consider using commercial support, see
Technical Support for NGINX and NGINX Plus Software.


Maxim D.
http://nginx.org/

On 7/31/15 8:05 PM, Jerry Wyman wrote:

Hi,

Im new to nginx and am trying to load-balance ssh sessions to an
autoscaling group of ECS instances in AWS.

[…]

Just curious: is it just a test or a real use-case? Why does anybody
want to load-balance ssh?


Maxim K.

Thanks Maxim,

I’ll give that a try.

Much appreciated, Jerry

Posted at Nginx Forum: