Unable to connect to fabric with a SSH private/public key
vincent.desjardins Jun 19, 2014 11:00 AMHi,
I'm trying to setup a private/public key authentification with Fabric. My public key is setuped like this in the file etc/keys.properties:
asuser=AAAAB3NzaC1yc2EAAAABIwAAAQEAo6ZWXYfnudsP4Za1g8Y7ezkIJsiSjIbGXmxyP3ZQYAq4yKxI4JkJ3gbcRIzVP2PvCNdmgOnn0fog0xVYdZGQnw33QfR8yQRYccm6jyuw1NeoiH7OnpyfhoHOuy10hXsz3eFviFeKG4SYZjLTCDgdyKicF68/dbc6/R17g3Fd21BgQkS058YfWCfTRHzagETfsA73veQuf1nZYarWl3X4qFYlV0/XO72EJr4yXgL3y7u/v79VivXa0WKikqRe4gf6nwJum90oQNrqQ/9uib0OUHzZ+T+LxD3ZQjCAOK21SqykOOMyjqdn0lu84LCKT0uHRVFak1gSq+z0xzlA3y2ogw==,admin
Connecting with OpenSSH client with my private key always results in a password prompt.
I didn't alter the default realms in Fabric. They are configured like this:
JBossFuse:karaf@esb-test-01> jaas:realms
Index Realm Module Class
1 karaf org.apache.karaf.jaas.modules.properties.PropertiesLoginModule
2 karaf org.apache.karaf.jaas.modules.publickey.PublickeyLoginModule
3 karaf io.fabric8.jaas.ZookeeperLoginModule
I tried to deploy a configuration blueprint with the same PublickeyLoginModule. After the deployment the SSH connection with my private key succeed *but* all other authentification fail. For exemple I can't connect anymore to the web console.
Here is the blueprint that I tried:
<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:jaas="http://karaf.apache.org/xmlns/jaas/v1.0.0"
xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0">
<!-- Allow usage of System properties, especially the karaf.base property -->
<ext:property-placeholder placeholder-prefix="$[" placeholder-suffix="]"/>
<jaas:config name="karaf" rank="2">
<jaas:module className="org.apache.karaf.jaas.modules.publickey.PublickeyLoginModule"
flags="sufficient">
users = $[karaf.base]/etc/keys.properties
</jaas:module>
</jaas:config>
</blueprint>
What am I missing? Do I have to configure something else?