I am running SSHD.bat as it is on java 7.45 - 64 bit.
I try to use WinSCP to connect but it gives me the following error:
22201 [Thread-3] ERROR org.apache.sshd.server.sftp.SftpSubsystem -
Exception caught in SFTP subsystem
java.lang.UnsupportedOperationException: View 'unix' not available
at
sun.nio.fs.AbstractFileSystemProvider.readAttributes(AbstractFileSystemProvider.java:91)
at java.nio.file.Files.readAttributes(Files.java:1911)
at
org.apache.sshd.common.file.nativefs.NativeSshFileNio.getAttributes(NativeSshFileNio.java:58)
at
org.apache.sshd.server.sftp.SftpSubsystem.getLongName(SftpSubsystem.java:848)
at
org.apache.sshd.server.sftp.SftpSubsystem.sendPath(SftpSubsystem.java:809)
at
org.apache.sshd.server.sftp.SftpSubsystem.process(SftpSubsystem.java:712)
at
org.apache.sshd.server.sftp.SftpSubsystem.run(SftpSubsystem.java:334)
at java.lang.Thread.run(Thread.java:744)
I tried both NIO2 and MINA ios but none seems to be working.
It seems like a bug in the code below where unix:size is used:
* <strong>Internal class, do not use directly.</strong>
*
* This class wraps native file object.
*
* @author <a href="http://mina.apache.org">Apache MINA Project</a>
*/
public class NativeSshFileNio extends NativeSshFile {
/**
* Constructor, internal do not use directly.
* @param nativeFileSystemView
*/
public NativeSshFileNio(NativeFileSystemView nativeFileSystemView,
String fileName, File file, String userName) {
super(nativeFileSystemView, fileName, file, userName);
}
public Map<Attribute, Object> getAttributes(boolean followLinks) throws
IOException {
Map<String, Object> a = Files.readAttributes(
file.toPath(),
"unix:size,uid,owner,gid,group,isDirectory,isRegularFile,isSymbolicLink,permissions,creationTime,lastModifiedTime,lastAccessTime",
followLinks ? new LinkOption[0] : new LinkOption[] {
LinkOption.NOFOLLOW_LINKS });
.....
...
...
...
...
...
..
...