SftpClient is producing diffent file size

"Mustafa Cayci" <[email protected]>
Newsgroups gmane.comp.java.sshtools.user
Message-ID <[email protected]>
Hi,

I am using the latest J2SSH.  I have the following code segment


            properties.setHost(hostName2);
            properties.setPrefPublicKey("ssh-dss");
            ssh.connect(properties, new IgnoreHostKeyVerification());
            pwd = new PasswordAuthenticationClient();
            pwd.setUsername(userName2);
            pwd.setPassword(password2);
            // Try the authentication
            result = ssh.authenticate(pwd);
            // Evaluate the result
            if (result == AuthenticationProtocolState.COMPLETE) {
                // The connection is authenticated we can now do some real
work!
                SessionChannelClient session = ssh.openSessionChannel();
                session.executeCommand("find " + asDirectory2 + " -type f
-exec md5sum {} \\; > " + hostName2 + "_orafiles.lst");
                SftpClient sftp = ssh.openSftpClient();
                sftp.lcd("/home/" + userName2);
                sftp.get(hostName2 + "_orafiles.lst");
                sftp.quit();
                ssh.disconnect();

This code is successfully creating the file on the remote server and ftp'ing
back to my local server.  But the file size is always different from one run
to another even though on the remote server, the file size always stays the
same.

Any ideas?

Thanks so much,

Mustafa

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

_______________________________________________
Sshtools-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sshtools-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.