How to completely terminate the automatic SSH login on the Mac terminal?

This might seem like a duplicate question but its not. Every answer on stack overflow does not answer my problem yet. So I set up a SSH connection for accessing Hadoop on my mac but I only want to use the SSH connection when I use Hadoop. But whenever I quit the terminal and restart it, the automatic SSH login comes into action. How do I stop this?

Using command like exit just stops the current connection but a new connection is established as soon as I open a new terminal.