You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by kimhorn <ki...@icsglobal.net> on 2009/04/06 03:16:59 UTC
VFS Known Hosts Exception SFTP unusable
I am getting a known hosts exception when using SFTP with VFS. This is
obvious error, as Synapse has no idea of the SFTP hosts it can trust. So
jsch library can't find the known_hosts file as Synapse has not told it
where it is. Spent a few hours looking for somewhere to set this but can't
find it.
Open SSH stores these in a know location, but Synapse-VFS doesn't know this;
as its not configured ?
Other applicatons that use Jsch library have a documented setting for this.
For Jsch this file could be anywhere as it is up to calling application to
configure it, with a call to setKnownHosts.
Does Synapse VFS Mediator use a known location for "known_hosts" file ?
- where do I put the Key ?
- is there a setting for this in a config file ?
- is this documented ?
If above is not implemented then can I tell VFS to just trust this host; is
this an VFS option in Synapse Mediator ?
- if Yes what is the syntax and should it be documented ?
- if not why is this not an option ?
So this is same as doing call:
SftpFileSystemConfigBuilder.getInstance().setStrictHostKeyChecking(ops,
"no");
HOWEVER, this may not be a secure option; and Synapse should rely on a
known_hosts file.
Unless one of the above is implemented or settable, then VFS SFTP is pretty
useless.
Thanks
Kim
Exception info ( note, I put in the XXX and LOCATION for security):
FTP server at "sftp://XXX:XXXXX@c-connect.LOCATION.com/".
org.apache.commons.vfs.FileSystemException: Could not connect to SFTP server
at "sftp://XXX:XXXXX@c-connect.LOCATION.com/".
at
org.apache.commons.vfs.provider.sftp.SftpFileProvider.doCreateFileSystem(SftpFileProvider.java:99)
at
org.apache.commons.vfs.provider.AbstractOriginatingFileProvider.findFile(AbstractOriginatingFileProvider.java:81)
at
org.apache.commons.vfs.provider.AbstractOriginatingFileProvider.findFile(AbstractOriginatingFileProvider.java:62)
at
org.apache.commons.vfs.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:641)
at
org.apache.commons.vfs.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:602)
at
org.apache.commons.vfs.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:570)
at
org.apache.synapse.transport.vfs.VFSTransportListener.scanFileOrDirectory(VFSTransportListener.java:164)
at
org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:138)
at
org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:105)
at
org.apache.axis2.transport.base.AbstractPollingTransportListener$1$1.run(AbstractPollingTransportListener.java:97)
at
org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:58)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:595)
Caused by: org.apache.commons.vfs.FileSystemException: Could not connect to
SFTP server at "c-connect.LOCATION.com".
at
org.apache.commons.vfs.provider.sftp.SftpClientFactory.createConnection(SftpClientFactory.java:214)
at
org.apache.commons.vfs.provider.sftp.SftpFileProvider.doCreateFileSystem(SftpFileProvider.java:90)
... 13 more
Caused by: com.jcraft.jsch.JSchException: UnknownHostKey:
c-connect.LOCATION.com. DSA key fingerprint is
00:96:17:70:sw:ce:f9:b1:2a:b7:5aq:36:0a:we:b1:ed
--
View this message in context: http://www.nabble.com/VFS-Known-Hosts-Exception-SFTP-unusable-tp22900817p22900817.html
Sent from the Synapse - Dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org
Re: VFS Known Hosts Exception SFTP unusable
Posted by Andreas Veithen <an...@gmail.com>.
Kim,
Thanks for letting us know about the solution. Since this information
will be useful to others, I added that to the relevant documentation.
Andreas
On Tue, Apr 7, 2009 at 06:04, Kim Horn <ki...@icsglobal.net> wrote:
> We solved this problem.
>
> 1) Jsch uses the location $HOME/.ssh for the known_hosts file by
> default.
> - this location is $HOMEPATH/.ssh in Windows.
>
> 2) Open ssh uses this location too by default.
>
> 3) If you open an ssh session on the target host it will ask to add the
> credentials to this file.
> - however the session will fail as you should not have permission on
> an SFTP server to do this; but thats OK.
>
> 4) As Now you have the updated known_hosts file
>
>
> VFS:SFTP will now work with this host.
>
> Kim
>
>
> -----Original Message-----
> From: Asankha Perera [mailto:asankha.apache@gmail.com] On Behalf Of
> Asankha C. Perera
> Sent: Monday, 6 April 2009 3:34 PM
> To: dev@synapse.apache.org
> Subject: Re: VFS Known Hosts Exception SFTP unusable
>
> Hi Kim
>> I am getting a known hosts exception when using SFTP with VFS. This is
>> obvious error, as Synapse has no idea of the SFTP hosts it can trust.
> So
>> jsch library can't find the known_hosts file as Synapse has not told
> it
>> where it is. Spent a few hours looking for somewhere to set this but
> can't
>> find it.
>>
>> Open SSH stores these in a know location, but Synapse-VFS doesn't know
> this;
>> as its not configured ?
>> Other applicatons that use Jsch library have a documented setting for
> this.
>> For Jsch this file could be anywhere as it is up to calling
> application to
>> configure it, with a call to setKnownHosts.
>>
>> Does Synapse VFS Mediator use a known location for "known_hosts" file
> ?
>> - where do I put the Key ?
>> - is there a setting for this in a config file ?
>> - is this documented ?
>>
>> If above is not implemented then can I tell VFS to just trust this
> host; is
>> this an VFS option in Synapse Mediator ?
>> - if Yes what is the syntax and should it be documented ?
>> - if not why is this not an option ?
>>
>>
>> Exception info ( note, I put in the XXX and LOCATION for security):
>>
>> FTP server at "sftp://XXX:XXXXX@c-connect.LOCATION.com/".
>> org.apache.commons.vfs.FileSystemException: Could not connect to SFTP
> server
>> at "sftp://XXX:XXXXX@c-connect.LOCATION.com/".
>>
> This seems like an obvious enhancement required. Can you open a JIRA
> with this information?
>
> BTW, I believe your server is using a certificate issued from a private
> certification authority?.. did you try importing its CA cert as a
> trusted into the JDK's trust store cacerts?
>
> cheers
> asankha
>
> --
> Asankha C. Perera
> AdroitLogic, http://adroitlogic.org
>
> http://esbmagic.blogspot.com
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
> For additional commands, e-mail: dev-help@synapse.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
> For additional commands, e-mail: dev-help@synapse.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org
RE: VFS Known Hosts Exception SFTP unusable
Posted by Kim Horn <ki...@icsglobal.net>.
We solved this problem.
1) Jsch uses the location $HOME/.ssh for the known_hosts file by
default.
- this location is $HOMEPATH/.ssh in Windows.
2) Open ssh uses this location too by default.
3) If you open an ssh session on the target host it will ask to add the
credentials to this file.
- however the session will fail as you should not have permission on
an SFTP server to do this; but thats OK.
4) As Now you have the updated known_hosts file
VFS:SFTP will now work with this host.
Kim
-----Original Message-----
From: Asankha Perera [mailto:asankha.apache@gmail.com] On Behalf Of
Asankha C. Perera
Sent: Monday, 6 April 2009 3:34 PM
To: dev@synapse.apache.org
Subject: Re: VFS Known Hosts Exception SFTP unusable
Hi Kim
> I am getting a known hosts exception when using SFTP with VFS. This is
> obvious error, as Synapse has no idea of the SFTP hosts it can trust.
So
> jsch library can't find the known_hosts file as Synapse has not told
it
> where it is. Spent a few hours looking for somewhere to set this but
can't
> find it.
>
> Open SSH stores these in a know location, but Synapse-VFS doesn't know
this;
> as its not configured ?
> Other applicatons that use Jsch library have a documented setting for
this.
> For Jsch this file could be anywhere as it is up to calling
application to
> configure it, with a call to setKnownHosts.
>
> Does Synapse VFS Mediator use a known location for "known_hosts" file
?
> - where do I put the Key ?
> - is there a setting for this in a config file ?
> - is this documented ?
>
> If above is not implemented then can I tell VFS to just trust this
host; is
> this an VFS option in Synapse Mediator ?
> - if Yes what is the syntax and should it be documented ?
> - if not why is this not an option ?
>
>
> Exception info ( note, I put in the XXX and LOCATION for security):
>
> FTP server at "sftp://XXX:XXXXX@c-connect.LOCATION.com/".
> org.apache.commons.vfs.FileSystemException: Could not connect to SFTP
server
> at "sftp://XXX:XXXXX@c-connect.LOCATION.com/".
>
This seems like an obvious enhancement required. Can you open a JIRA
with this information?
BTW, I believe your server is using a certificate issued from a private
certification authority?.. did you try importing its CA cert as a
trusted into the JDK's trust store cacerts?
cheers
asankha
--
Asankha C. Perera
AdroitLogic, http://adroitlogic.org
http://esbmagic.blogspot.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org
Re: VFS Known Hosts Exception SFTP unusable
Posted by "Asankha C. Perera" <as...@apache.org>.
Hi Kim
> I am getting a known hosts exception when using SFTP with VFS. This is
> obvious error, as Synapse has no idea of the SFTP hosts it can trust. So
> jsch library can't find the known_hosts file as Synapse has not told it
> where it is. Spent a few hours looking for somewhere to set this but can't
> find it.
>
> Open SSH stores these in a know location, but Synapse-VFS doesn't know this;
> as its not configured ?
> Other applicatons that use Jsch library have a documented setting for this.
> For Jsch this file could be anywhere as it is up to calling application to
> configure it, with a call to setKnownHosts.
>
> Does Synapse VFS Mediator use a known location for "known_hosts" file ?
> - where do I put the Key ?
> - is there a setting for this in a config file ?
> - is this documented ?
>
> If above is not implemented then can I tell VFS to just trust this host; is
> this an VFS option in Synapse Mediator ?
> - if Yes what is the syntax and should it be documented ?
> - if not why is this not an option ?
>
>
> Exception info ( note, I put in the XXX and LOCATION for security):
>
> FTP server at "sftp://XXX:XXXXX@c-connect.LOCATION.com/".
> org.apache.commons.vfs.FileSystemException: Could not connect to SFTP server
> at "sftp://XXX:XXXXX@c-connect.LOCATION.com/".
>
This seems like an obvious enhancement required. Can you open a JIRA
with this information?
BTW, I believe your server is using a certificate issued from a private
certification authority?.. did you try importing its CA cert as a
trusted into the JDK's trust store cacerts?
cheers
asankha
--
Asankha C. Perera
AdroitLogic, http://adroitlogic.org
http://esbmagic.blogspot.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org