Connection possible for "SSH Tunnel to RDS instance through Boundary" after session termination

I have a ssh tunnel connection to a RDS Postgres instance through Boundary.
UI shows that session is terminated but Im still able to connect to RDS instance from my local machine on mapped port of tunnelling to RDS. Even if I should down Boundary, Im still able to use my connection.

For normal SSH or Postgres connections, if I cancel session, connection is terminated immediately

Hey there, thanks for opening this. It would be helpful if you could describe the infra here in more detail: By ssh connection to RDS, do you mean you’re accessing an RDS endpoint over a jump host? RDS can be publicly exposed or not and this is largely dependent on your security group and RDS configuration.

RDS isn’t publicly accessible and only through SSH tunneling to an EC2 instance.

From local machine something like this is used to connect through boundary: boundary connect ssh -username user1 -target-id ttcp_1ka5ij97P6 – -f -N -L -p 22

The -p 22 in your arguments to boundary connect ssh is actually sending the SSH connection over a direct connection to and bypassing the Boundary proxy for your SSH session. Try removing that bit and see if you get the results you expect when terminating the session.