SFTP Key Exchange Process in FileZilla FTP Client

Q

How to see the key exchange process in an SFTP connection with FileZilla FTP Client?

✍: FYIcenter.com

A

If you are connecting to a SFTP server, FileZilla FTP Client needs to go through a handshake process to exchange a secret key with the FTP server. The exchanged secret key will be used to encrypt all subsequent communications in the SFTP session.

You can turn on the Debug message in the log file to see the key exchange process and to know what types of algorithms are used. Below is a good example of a SFTP handshake process for exchanging a secret key:

Status: Connecting to ftp.somebody.com...
Trace: Going to execute C:\Program Files\FileZilla FTP Client\fzsftp.exe
Response: fzSftp started, protocol_version=7
Trace: CSftpControlSocket::ConnectParseResponse(fzSftp started, protocol_version=7)
Trace: CSftpControlSocket::SendNextCommand()
Trace: CSftpControlSocket::ConnectSend()
Command: open "username@ftp.somebody.com" 22
Trace: Connecting to xx,xx,xx,xx port 22
Trace: We claim version: SSH-2.0-PuTTY_Local:_timestamp_
Trace: Server version: SSH-2.0-1.36_sshlib GlobalSCAPE
Trace: We believe remote version ignores SSH-2 maximum packet size
Trace: Using SSH protocol version 2
Trace: Doing Diffie-Hellman group exchange
Trace: Doing Diffie-Hellman key exchange with hash SHA-1
Trace: Host key fingerprint is:
Trace: ssh-dss 1024 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx
Trace: Initialised AES-256 CBC client->server encryption
Trace: Initialised HMAC-SHA1 client->server MAC algorithm
Trace: Initialised AES-256 CBC server->client encryption
Trace: Initialised HMAC-SHA1 server->client MAC algorithm
Trace: Further authentication required
Command: Pass: ********
Trace: Sent password
Trace: Access granted
Trace: Opening session as main channel
Trace: Opened main channel
Trace: Started a shell/command
Status: Connected to ftp.somebody.com
Trace: CSftpControlSocket::ConnectParseResponse()
Trace: CSftpControlSocket::ResetOperation(0)
Trace: CControlSocket::ResetOperation(0)
Trace: CFileZillaEnginePrivate::ResetOperation(0)
Status: Retrieving directory listing...
Trace: CSftpControlSocket::SendNextCommand()
Trace: CSftpControlSocket::ChangeDirSend()
Command: pwd
Response: Current directory is: "/"
Trace: CSftpControlSocket::ResetOperation(0)
Trace: CControlSocket::ResetOperation(0)
Trace: CSftpControlSocket::ParseSubcommandResult(0)
Trace: CSftpControlSocket::ListSubcommandResult()
Trace:   state = 1
Trace: CSftpControlSocket::SendNextCommand()
Trace: CSftpControlSocket::ListSend()
Trace:   state = 3
Command: ls
Status: Listing directory /
Trace: CSftpControlSocket::ListParseResponse()
Trace: CSftpControlSocket::ResetOperation(0)
Trace: CControlSocket::ResetOperation(0)
Status: Directory listing of "/" successful
...

Notes on the above example:

  • The FTP server is using SSH-2.0-1.36_sshlib package produced by GlobalSCAPE.
  • Diffie-Hellman algorithm is used to exchange and establish a secret key.
  • The FTP server has a host key fingerprint, which can verify separately to trust the server.
  • AES-256 CBC algorithm is used to encrypt all subsequent communications.

 

Uninstall FileZilla FTP Client

SFTP Log File Entries in FileZilla FTP Client

Using FileZilla FTP Client

⇑⇑ FTP - Frequently Asked Questions

2016-11-11, 5644🔥, 0💬