I want to fetch files with FTP or CIFS protocol in IPV6 network env, but I find that common-vfs2 does not support IPV6.
Is there any way to resolve that?
Or any replaced Jar for common-vfs2
Thanks a lot
I want to fetch files with FTP or CIFS protocol in IPV6 network env, but I find that common-vfs2 does not support IPV6.
Is there any way to resolve that?
Or any replaced Jar for common-vfs2
Thanks a lot
From the ticket VFS-524, looks like commons-vfs2 does not support IPv6 yet.
You can use JSch SFTP as a replacement, I have tried JSch version 0.1.54, it works. Example code as below (Just example, please modify to make it robust):
JSch ssh = new JSch();
ssh.setKnownHosts("/home/the_user/known_hosts");
session = ssh.getSession("the_user_name", "the_ipv6_ip", 22);
session.setConfig("StrictHostKeyChecking", "yes");
session.setPassword("the_password");
session.connect();
channel = session.openChannel("sftp");
channel.connect();
ChannelSftp sftp = (ChannelSftp) channel;
sftp.get("the_remote_file_path", "local_file_path");