本文整理汇总了Java中org.apache.sshd.common.KeyPairProvider类的典型用法代码示例。如果您正苦于以下问题:Java KeyPairProvider类的具体用法?Java KeyPairProvider怎么用?Java KeyPairProvider使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
KeyPairProvider类属于org.apache.sshd.common包,在下文中一共展示了KeyPairProvider类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: createRouteBuilder
import org.apache.sshd.common.KeyPairProvider; //导入依赖的package包/类
@Override
protected RouteBuilder createRouteBuilder() throws Exception {
return new RouteBuilder() {
@Override
public void configure() {
onException(Exception.class)
.handled(true)
.to("mock:error");
SshComponent sshComponent = new SshComponent();
sshComponent.setHost("localhost");
sshComponent.setPort(port);
sshComponent.setUsername("smx");
sshComponent.setKeyPairProvider(new FileKeyPairProvider(new String[]{"src/test/resources/hostkey.pem"}));
sshComponent.setKeyType(KeyPairProvider.SSH_RSA);
getContext().addComponent("ssh-rsa", sshComponent);
from("direct:ssh-rsa")
.to("ssh-rsa:test")
.to("mock:rsa");
from("direct:ssh-rsaFile")
.to("ssh://[email protected]:" + port + "?certResource=file:src/test/resources/hostkey.pem")
.to("mock:rsaFile");
}
};
}
开发者ID:HydAu,项目名称:Camel,代码行数:29,代码来源:SshComponentSecurityTest.java
示例2: getKeyPairProvider
import org.apache.sshd.common.KeyPairProvider; //导入依赖的package包/类
public KeyPairProvider getKeyPairProvider() {
return getConfiguration().getKeyPairProvider();
}
开发者ID:HydAu,项目名称:Camel,代码行数:4,代码来源:SshEndpoint.java
示例3: setKeyPairProvider
import org.apache.sshd.common.KeyPairProvider; //导入依赖的package包/类
public void setKeyPairProvider(KeyPairProvider keyPairProvider) {
getConfiguration().setKeyPairProvider(keyPairProvider);
}
开发者ID:HydAu,项目名称:Camel,代码行数:4,代码来源:SshEndpoint.java
示例4: getKeyPairProvider
import org.apache.sshd.common.KeyPairProvider; //导入依赖的package包/类
public KeyPairProvider getKeyPairProvider() {
return keyPairProvider;
}
开发者ID:HydAu,项目名称:Camel,代码行数:4,代码来源:SshConfiguration.java
示例5: setKeyPairProvider
import org.apache.sshd.common.KeyPairProvider; //导入依赖的package包/类
public void setKeyPairProvider(KeyPairProvider keyPairProvider) {
this.keyPairProvider = keyPairProvider;
}
开发者ID:HydAu,项目名称:Camel,代码行数:4,代码来源:SshComponentConfiguration.java
示例6: setKeyPairProvider
import org.apache.sshd.common.KeyPairProvider; //导入依赖的package包/类
@Inject
public void setKeyPairProvider(KeyPairProvider keyPairProvider) {
this.keyPairProvider = keyPairProvider;
}
开发者ID:cloudnautique,项目名称:cloud-cattle,代码行数:5,代码来源:SshAgentConnectionFactory.java
示例7: GenerateNewKeyPair
import org.apache.sshd.common.KeyPairProvider; //导入依赖的package包/类
public static KeyPairProvider GenerateNewKeyPair(){
return new InMemoryKeyPair(new KeyPairGenerator().dsa().generateKeyPair());
}
开发者ID:signed,项目名称:in-memory-infrastructure,代码行数:4,代码来源:InMemoryKeyPair.java
示例8: createPEMHostKeyProvider
import org.apache.sshd.common.KeyPairProvider; //导入依赖的package包/类
@Override
public KeyPairProvider createPEMHostKeyProvider(String path) {
return new PEMHostKeyProvider(path);
}
开发者ID:yahoo,项目名称:artifactory_ssh_proxy,代码行数:5,代码来源:SshdPEMHostKeyProviderFactory.java
示例9: setKeyPairProvider
import org.apache.sshd.common.KeyPairProvider; //导入依赖的package包/类
/**
* Sets the KeyPairProvider reference to use when connecting using Certificates to the remote SSH Server.
*
* @param keyPairProvider KeyPairProvider reference to use in authenticating. If set to 'null',
* then will attempt to connect using username/password settings.
*
* @see KeyPairProvider
*/
public void setKeyPairProvider(KeyPairProvider keyPairProvider) {
this.keyPairProvider = keyPairProvider;
}
开发者ID:HydAu,项目名称:Camel,代码行数:12,代码来源:SshConfiguration.java
示例10: setKeyPairProvider
import org.apache.sshd.common.KeyPairProvider; //导入依赖的package包/类
/**
* Sets the KeyPairProvider reference to use when connecting using Certificates to the remote SSH Server.
*
* @param keyPairProvider KeyPairProvider reference to use in authenticating. If set to 'null',
* then will attempt to connect using username/password settings.
*
* @see KeyPairProvider
*/
public void setKeyPairProvider(KeyPairProvider keyPairProvider) {
getConfiguration().setKeyPairProvider(keyPairProvider);
}
开发者ID:HydAu,项目名称:Camel,代码行数:12,代码来源:SshComponent.java
示例11: createPEMHostKeyProvider
import org.apache.sshd.common.KeyPairProvider; //导入依赖的package包/类
KeyPairProvider createPEMHostKeyProvider(String path);
开发者ID:yahoo,项目名称:artifactory_ssh_proxy,代码行数:2,代码来源:PEMHostKeyProviderFactory.java
注:本文中的org.apache.sshd.common.KeyPairProvider类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论