0 votes
1 view
in AWS by (18.1k points)

I'm on EC2 t2.small instance (2GB RAM) and keep getting locked outside the server without the ability to ssh into it.

the error message is ssh_exchange_identification: read: Connection reset by peer

Knowing the application, I assume it leaks memory and that SSHD is blocked due to that.

Is there a way to allow SSH connection to a Linux box that has its RAM full?

Can I someone have SSHD reserve enough memory for new connections?

1 Answer

0 votes
by (42.2k points)

You cannot pre-allocate memory but you can set the memory limit so that sshd doesn't eat all the memory. use man ulimit to check the details. If a Java app, use -Xmx to set max amount of memory which can be used.

...