protected override void OnChannelOpen()
{
SendMessage(new SftpInitRequest(MaximumSupportedVersion));
WaitOnHandle(_sftpVersionConfirmed, OperationTimeout);
if (ProtocolVersion > MaximumSupportedVersion || ProtocolVersion < MinimumSupportedVersion)
{
throw new NotSupportedException(string.Format(CultureInfo.CurrentCulture, "Server SFTP version {0} is not supported.", ProtocolVersion));
}
// Resolve current directory
WorkingDirectory = RequestRealPath(".").First().Key;
}