There are two layers involved in a SFTP connection: the
Transport layer
and
Authentication layer
. The Transport layer is used to establish the encryption algorithm and to create a secure connection between the Client and Server. The Authentication layer is used to determine whether the Client is authorized to connect to the Server.