2018-04-18 21:17 GMT+02:00 <[email protected]>: > > > org.apache.sshd.common.util.security.SecurityUtils > > The API Java docs show https://mina.apache.org/sshd- > project/apidocs/org/apache/sshd/common/util/SecurityUtils.html# > setRegisterBouncyCastle-boolean- (that is the method I need) > > The API Java docs on the web page are 1.1.0, this method doesn't seem to > exist in 1.7.0 anymore. I have no idea what a method > "setRegisterBouncyCastle" is good for. What can I do instead? In the old > code it was set to false. > > See https://github.com/apache/mina-sshd/blob/master/README.md#security-providers-setup By default, BouncyCastle should be used if available.
> > > > > > import org.apache.sshd.server.FileSystemView; > > > import org.apache.sshd.server.SshFile; > > > import org.apache.sshd.server.filesystem.NativeFileSystemView; > > > import org.apache.sshd.server.filesystem.NativeSshFile; > > > > > > > Those files don't exist anymore. SSHD is now using the > > java.nio.file.FileSystem api > > > > So that means that calls like > > sshd.setFileSystemFactory(new AndroidFileSystemFactory(context)); > > I can ommit completely, because the File nio is being used? I took a look > at that 5 minute sshd example, there are non of these set... methods being > used anymore. > See https://github.com/apache/mina-sshd/blob/master/README.md#filesystemfactory-usage > > > > > The classes do not exist anymore, but I suppose the code was using the > > factories which are now available through org.apache.sshd.common.kex. > > BuiltinDHFactories.dhg1 > > > > The old code is > > sshd.setKeyExchangeFactories(Arrays.asList( > new DHG14.Factory(), > new DHG1.Factory())); > > the method setKeyExchangeFactories doesn't seem to exist anymore either. > Do I have to set what key exchanges I want to use? The 5 minute example > doesn't show this call. Can I just omit it? > https://github.com/apache/mina-sshd/blob/master/sshd-core/src/main/java/org/apache/sshd/common/kex/AbstractKexFactoryManager.java#L63 But the call is slightly more complicated: sshd.setKeyExchangeFactories( NamedFactory.setUpTransformedFactories( false, Arrays.asList(BuiltinDHFactories.dhg14, BuiltinDHFactories.dhg1), ServerBuilder.DH2KEX)); Unless you want to disable some supported DH factories, you should simply use the default. -- ------------------------ Guillaume Nodet
