SFTP Server and SFTP Client

Hi

I have a general question with any SFTP client and Server.

For eg., if the SFTP server provides a list of Key Exchange algorithms/Ciphers/HMAC as supported ones, and SFTP client also has a list of supported ones, how does an SFTP client chooses the desired algorithms.

1. Does it choose automatically whichever matches first?

2. Can we provide any choice at the SFTP client to make sure it always connects to particular algorithms?

3. Does it get chosen based on SFTP Server settings?

We are using SAP SFTP adapter and have a list of algorithms in place, but we are not able to verify how the algorithms and HMAC are chosen.

Please clarify