Guillaume Nodet | 6b2946d | 2009-06-18 20:57:23 +0000 | [diff] [blame] | 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <!-- |
| 3 | |
| 4 | Licensed to the Apache Software Foundation (ASF) under one or more |
| 5 | contributor license agreements. See the NOTICE file distributed with |
| 6 | this work for additional information regarding copyright ownership. |
| 7 | The ASF licenses this file to You under the Apache License, Version 2.0 |
| 8 | (the "License"); you may not use this file except in compliance with |
| 9 | the License. You may obtain a copy of the License at |
| 10 | |
| 11 | http://www.apache.org/licenses/LICENSE-2.0 |
| 12 | |
| 13 | Unless required by applicable law or agreed to in writing, software |
| 14 | distributed under the License is distributed on an "AS IS" BASIS, |
| 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 16 | See the License for the specific language governing permissions and |
| 17 | limitations under the License. |
| 18 | |
| 19 | --> |
| 20 | <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" |
| 21 | xmlns:ext="http://geronimo.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0"> |
| 22 | |
| 23 | <ext:property-placeholder placeholder-prefix="$[" placeholder-suffix="]"/> |
| 24 | |
| 25 | <bean id="sshClient" class="org.apache.sshd.SshClient" factory-method="setUpDefaultClient" init-method="start" destroy-method="stop"> |
| 26 | </bean> |
| 27 | |
| 28 | <bean id="sshServer" class="org.apache.sshd.SshServer" factory-method="setUpDefaultServer" scope="prototype"> |
| 29 | <property name="port" value="${sshPort}" /> |
| 30 | <property name="shellFactory"> |
| 31 | <bean class="org.apache.geronimo.gshell.commands.ssh.ShellFactoryImpl"> |
| 32 | <property name="application" ref="application" /> |
| 33 | <property name="completers"> |
| 34 | <list> |
| 35 | <ref component-id="commandsCompleter"/> |
| 36 | <ref component-id="aliasNameCompleter"/> |
| 37 | </list> |
| 38 | </property> |
| 39 | <property name="executor" ref="commandLineExecutor" /> |
| 40 | <property name="prompter"> |
| 41 | <bean class="org.apache.geronimo.gshell.wisdom.shell.ConsolePrompterImpl"> |
| 42 | <argument ref="application"/> |
| 43 | </bean> |
| 44 | </property> |
| 45 | <property name="errorHandler"> |
| 46 | <bean class="org.apache.geronimo.gshell.wisdom.shell.ConsoleErrorHandlerImpl" /> |
| 47 | </property> |
| 48 | <property name="history"> |
| 49 | <bean class="org.apache.geronimo.gshell.wisdom.shell.HistoryImpl"> |
| 50 | <argument ref="application"/> |
| 51 | </bean> |
| 52 | </property> |
| 53 | </bean> |
| 54 | </property> |
| 55 | <property name="commandFactory"> |
| 56 | <bean class="org.apache.felix.karaf.gshell.core.sshd.ShellCommandFactory"> |
| 57 | <property name="executor" ref="commandLineExecutor" /> |
| 58 | </bean> |
| 59 | </property> |
| 60 | <property name="keyPairProvider" ref="keyPairProvider" /> |
| 61 | <property name="passwordAuthenticator" ref="passwordAuthenticator" /> |
| 62 | </bean> |
| 63 | |
| 64 | <bean id="keyPairProvider" class="org.apache.sshd.server.keyprovider.SimpleGeneratorHostKeyProvider"> |
| 65 | <property name="path" value="${hostKey}" /> |
| 66 | </bean> |
| 67 | <bean id="passwordAuthenticator" class="org.apache.sshd.server.jaas.JaasPasswordAuthenticator"> |
| 68 | <property name="domain" value="${sshRealm}" /> |
| 69 | </bean> |
| 70 | |
| 71 | <bean id="sshServerFactory" class="org.apache.felix.karaf.gshell.core.sshd.SshServerFactory" init-method="start" destroy-method="stop"> |
| 72 | <argument ref="sshServer" /> |
| 73 | <property name="start" value="$[karaf.startRemoteShell]" /> |
| 74 | </bean> |
| 75 | |
| 76 | </blueprint> |