草庐IT

userAuthFactories

全部标签

java - SFTP 服务器在 Apache Mina SSHD 中设置用户/密码

我正在使用这个例子,取自JavaSFTPServerLibrary?:publicvoidsetupSftpServer(){SshServersshd=SshServer.setUpDefaultServer();sshd.setPort(22);sshd.setKeyPairProvider(newSimpleGeneratorHostKeyProvider("hostkey.ser"));List>userAuthFactories=newArrayList>();userAuthFactories.add(newUserAuthNone.Factory());sshd.setU