diff -ru SharpSSH.orig/ITransferProtocol.cs SharpSSH/ITransferProtocol.cs
--- SharpSSH.orig/ITransferProtocol.cs	2007-06-24 21:03:00.000000000 -0300
+++ SharpSSH/ITransferProtocol.cs	2010-09-03 15:58:58.000000000 -0300
@@ -57,5 +57,5 @@
 		event FileTransferEvent OnTransferProgress;
 	}
 
-	public delegate void FileTransferEvent(string src, string dst, int transferredBytes, int totalBytes, string message);
+	public delegate void FileTransferEvent(string src, string dst, Int64 transferredBytes, Int64 totalBytes, string message);
 }
diff -ru SharpSSH.orig/Scp.cs SharpSSH/Scp.cs
--- SharpSSH.orig/Scp.cs	2007-06-24 21:03:00.000000000 -0300
+++ SharpSSH/Scp.cs	2010-09-03 16:02:09.000000000 -0300
@@ -239,7 +239,7 @@
 			Channel channel=null;
 			Stream server = null;
 			m_cancelled=false;
-			int filesize=0;
+			Int64 filesize=0;
 			String filename=null;
 			string cmd = null;
 
@@ -417,10 +417,10 @@
 		/// <param name="dst">The remote destination path</param>
 		protected void SCP_SendFile(Stream server, string src, string dst)
 		{
-			int filesize = 0;
-			int copied = 0;
+			Int64 filesize = 0;
+			Int64 copied = 0;
 
-			filesize=(int)(new FileInfo(src)).Length;				
+			filesize=(new FileInfo(src)).Length;				
 
 			byte[] tmp=new byte[1];
 
@@ -473,19 +473,19 @@
 		/// <param name="server">A connected server I/O stream</param>
 		/// <param name="rfile">The remote file to copy</param>
 		/// <param name="lfile">The local destination path</param>
-		protected void SCP_ReceiveFile(Stream server, string rfile, string lfile, int size)
+		protected void SCP_ReceiveFile(Stream server, string rfile, string lfile, Int64 size)
 		{
-			int copied = 0;
+			Int64 copied = 0;
 			SendStartMessage(rfile, lfile, size, "Connected, starting transfer.");
 			// read a content of lfile
 			FileStream fos=File.OpenWrite(lfile);
 			int foo;
-			int filesize=size;
+			Int64 filesize=size;
 			byte[] buf = new byte[1024];
 			while(!m_cancelled)
 			{
 				if(buf.Length<filesize) foo=buf.Length;
-				else foo=filesize;
+				else foo=(int)filesize;
 				int len=server.Read(buf, 0, foo);
 				copied += len;
 				fos.Write(buf, 0, foo);
diff -ru SharpSSH.orig/SshTransferProtocolBase.cs SharpSSH/SshTransferProtocolBase.cs
--- SharpSSH.orig/SshTransferProtocolBase.cs	2007-06-24 21:03:00.000000000 -0300
+++ SharpSSH/SshTransferProtocolBase.cs	2010-09-03 15:58:10.000000000 -0300
@@ -73,7 +73,7 @@
 		/// <param name="dst">Transfer destination</param>
 		/// <param name="totalBytes">Total bytes to transfer</param>
 		/// <param name="msg">A transfer message</param>
-		protected void SendStartMessage(string src, string dst, int totalBytes, string msg)
+		protected void SendStartMessage(string src, string dst, Int64 totalBytes, string msg)
 		{
 			if (OnTransferStart != null)
 				OnTransferStart(src, dst, 0, totalBytes, msg);
@@ -87,7 +87,7 @@
 		/// <param name="transferredBytes">Transferred Bytes</param>
 		/// <param name="totalBytes">Total bytes to transfer</param>
 		/// <param name="msg">A transfer message</param>
-		protected void SendEndMessage(string src, string dst, int transferredBytes, int totalBytes, string msg)
+		protected void SendEndMessage(string src, string dst, Int64 transferredBytes, Int64 totalBytes, string msg)
 		{
 			if (OnTransferEnd != null)
 				OnTransferEnd(src, dst, transferredBytes, totalBytes, msg);
@@ -101,7 +101,7 @@
 		/// <param name="transferredBytes">Transferred Bytes</param>
 		/// <param name="totalBytes">Total bytes to transfer</param>
 		/// <param name="msg">A transfer message</param>
-		protected void SendProgressMessage(string src, string dst, int transferredBytes, int totalBytes, string msg)
+		protected void SendProgressMessage(string src, string dst, Int64 transferredBytes, Int64 totalBytes, string msg)
 		{
 			if (OnTransferProgress != null)
 			{

