To check if servers match compare them by
user, hostname and port.
When servers match is checked just by hostname and port
there is no way to access to the same server with different users
to execute special actions allowed for specific users.
There are workarounds to do it. But I think it should be done in standard way
through matching/comparing servers by 'user@hostname:port'.
I have found previous merged pull request with similar problem (about port):
and solved my issue in similar way.
Compare servers by user, hostname and port
Good call, I'll review this more properly later, but first glance looks good. Thanks for sticking to the CONTRIBUTING guidelines!
I hope it do not take you a lot of time.