commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From manco <megust...@yahoo.com>
Subject [VFS] problems connecting to one sftp site but not the other
Date Wed, 18 May 2005 22:42:52 GMT
Hi,
 
Ok, I can connect to one sftp site but not another. 
I had to turn off host checking to access the one that works but
that does not help me for the other one.
 
from the test Shell program ...
 
    private void cp(final String[] cmd) throws Exception
    {
        if (cmd.length < 3)
        {
            throw new Exception("USAGE: cp <src> <dest>");
        }
        // Testing for Sftp - turn off Strict Host Checking
        FileSystemOptions opts = new FileSystemOptions();
        SftpFileSystemConfigBuilder.getInstance().setStrictHostKeyChecking(
           opts, "no");
        String cking = SftpFileSystemConfigBuilder.getInstance().getStrictHostKeyChecking(
               opts );
        final FileObject src = mgr.resolveFile(cwd, cmd[1]);
        FileObject dest = mgr.resolveFile(cmd[2], opts);
        if (dest.exists() && dest.getType() == FileType.FOLDER)
        {
            dest = dest.resolveFile(src.getName().getBaseName());
        }
        dest.copyFrom(src, Selectors.SELECT_ALL);
    }
 
> cp C:/TEMP/OUT/build.xml   sftp://user:password@A.B.C.D/home/out/
Command failed:
org.apache.commons.vfs.FileSystemException: Could not connect to SFTP server at "sftp://user:password@A.B.B.C/".
 at org.apache.commons.vfs.provider.sftp.SftpFileProvider.doCreateFileSystem(SftpFileProvider.java:87)
 at org.apache.commons.vfs.provider.AbstractOriginatingFileProvider.findFile(AbstractOriginatingFileProvider.java:76)
 at org.apache.commons.vfs.provider.AbstractOriginatingFileProvider.findFile(AbstractOriginatingFileProvider.java:61)
 at org.apache.commons.vfs.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:513)
 at org.apache.commons.vfs.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:466)
 at com.eMeter.util.vfs.vfstest.Shell.cp(Shell.java:205)
 at com.eMeter.util.vfs.vfstest.Shell.handleCommand(Shell.java:121)
 at com.eMeter.util.vfs.vfstest.Shell.go(Shell.java:95)
 at com.eMeter.util.vfs.vfstest.Shell.main(Shell.java:57)
Caused by: org.apache.commons.vfs.FileSystemException: Could not connect to SFTP server at
"A.B.C.D".
 at org.apache.commons.vfs.provider.sftp.SftpClientFactory.createConnection(SftpClientFactory.java:166)
 at org.apache.commons.vfs.provider.sftp.SftpFileProvider.doCreateFileSystem(SftpFileProvider.java:79)
 ... 8 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
 at com.jcraft.jsch.Session.connect(Unknown Source)
 at com.jcraft.jsch.Session.connect(Unknown Source)
 at org.apache.commons.vfs.provider.sftp.SftpClientFactory.createConnection(SftpClientFactory.java:162)
 ... 9 more

When I manually get into this site via an sftp client I do see some different behavior than
normal
1. login with servername, user, port
2. <after login and before request for password I get a popup warning>
3. then a password window
4. <then a  Enter Authentication Response popup which requires a button push ok>
 
for my sftp site that works i dont see neither #2 nor #4. 
 
Could this be some type of extra security measure?
 
Does it sound like a know standard? 
 
Is there a way to handle this in vfs/sftp/jsch?
 
This error looks suspect:
Caused by: java.lang.ArrayIndexOutOfBoundsException: -1   (see above)

 
thanks,
Manco
 

 

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message