SFTP with Apache common VFS

Alles, was den Apache betrifft, kann hier besprochen werden.

SFTP with Apache common VFS

Postby jforum » 17. September 2008 08:47


I'm trying to use apache VFS to establish a connection with a SFTP server. The issue here is in the SFTP URL i am using.

The symbol "@" in the URL is the separator between the password and the host IP. Anything after the "@" symbol it treat as the IP of the server. But if my password itself contains the "@" symbol then there are two "@" symbols in my URL and it treat the first "@" symbol which is in the password as the separator and does not work.

Pls see the example below.

Is there any workaround???

FileSystemOptions fso = new FileSystemOptions();
DefaultFileSystemManager fsm = new DefaultFileSystemManager();
SftpFileObject fo = fsm.resolveFile("sftp://test:test@123@localhost/", fso).getContent().getFile();

Posts: 1
Joined: 17. September 2008 05:08

Postby Wiedmann » 17. September 2008 08:55

If have really no knowledge about VFS. But you have read this?:
http://commons.apache.org/vfs/api.html# ... entication

(BTW: Better ask such question in a mailing list for the VFS project.)
AF Moderator
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Return to Apache

Who is online

Users browsing this forum: Peterzzz and 3 guests