Apache

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • Known hosts checking for SFTP Ant tasks?

    1 answers - 1907 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    Thanks Mario. Got a better trace out of this now.

    >Any advice would be appreciated. In particular, is there no way to

    get
    >the full Java error trace, rather than just this generic error

    message?
    >
    >Start trying with a simple java class.
    >
    >Something like:
    >
    >F fo = VFS.getManager().resolveFile("sftp:// ");
    >fo.getContent().getLastModificationTime();
    >
    >That way you should get a better stacktrace.

    This *is* a hosts key problem - see error trace below:
    Could not connect to SFTP
    server at "sftp://test:test@localhost/".
    at
    (SftpFileProvider.java:87)
    at
    (AFileProvider.java:76)
    at
    (AFileProvider.java:61)
    at
    (Default
    FileSystemManager.java:524)
    at
    (Default
    FileSystemManager.java:488)
    at
    (Default
    FileSystemManager.java:458)
    at testSFTP.main(testSFTP.java:10)
    Caused by: Could not connect
    to SFTP server at "localhost".
    at
    (
    SftpClientFactory.java:172)
    at
    (SftpFileProvider.java:79)
    6 more
    Caused by: com.jcraft.jsch.JSchException: UnknownHostKey: localhost. RSA
    key fingerprint is
    at (Unknown Source)
    at (Unknown Source)
    at (Unknown Source)
    at
    (
    SftpClientFactory.java:168)
    7 more
    Exception in thread "main"
    So the questions remains! In the "black box" Ant task implementation,
    where is the code looking for the known_hosts file (running on Windows
    XP)?
    Thanks for any further help, Stuart
    This email has been scanned for all viruses by the MessageLabs Email
    Security System. http://www.messagelabs.com
    To unsubscribe, e-mail: commons-user-unsubscribe (AT) jakarta (DOT) apache.org
    For additional commands, e-mail: commons-user-help (AT) jakarta (DOT) apache.org
  • No.1 | | 927 bytes | |

    Hi !
    So the questions remains! In the "black box" Ant task implementation,
    where is the code looking for the known_hosts file (running on Windows
    XP)?

    The code is in VFSs SftpClientFactory class.
    It will look for a ssh-dir by:
    *) taking the system property vfs.sftp.sshdir
    *) searching in ${user.home}/.ssh
    *) searching in c:/cygwin/home/${user.name}/.ssh
    *) use the current directory

    The first existing directory will be used. Its assumed to find a
    known_hosts file in this directory.

    You can use the SftpFileSystemConfigBuilder to setup another directory
    or to disable the host key checking (StrictHostKeyChecking), tough, this
    cant be configured through the ant task.

    Ciao,
    Mario

    To unsubscribe, e-mail: commons-user-unsubscribe (AT) jakarta (DOT) apache.org
    For additional commands, e-mail: commons-user-help (AT) jakarta (DOT) apache.org

Re: Known hosts checking for SFTP Ant tasks?


max 4000 letters.
Your nickname that display:
In order to stop the spam: 8 + 7 =
QUESTION ON "Apache"

EMSDN.COM