You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by jd...@apache.org on 2008/11/22 07:52:26 UTC
svn commit: r719815 - in /geronimo/gshell/trunk/gshell-commands: ./
gshell-ssh/ gshell-ssh/src/ gshell-ssh/src/main/ gshell-ssh/src/main/java/
gshell-ssh/src/main/java/org/ gshell-ssh/src/main/java/org/apache/
gshell-ssh/src/main/java/org/apache/geroni...
Author: jdillon
Date: Fri Nov 21 22:52:25 2008
New Revision: 719815
URL: http://svn.apache.org/viewvc?rev=719815&view=rev
Log:
SSH support (yay!)
Added:
geronimo/gshell/trunk/gshell-commands/gshell-ssh/
geronimo/gshell/trunk/gshell-commands/gshell-ssh/pom.xml (with props)
geronimo/gshell/trunk/gshell-commands/gshell-ssh/src/
geronimo/gshell/trunk/gshell-commands/gshell-ssh/src/main/
geronimo/gshell/trunk/gshell-commands/gshell-ssh/src/main/java/
geronimo/gshell/trunk/gshell-commands/gshell-ssh/src/main/java/org/
geronimo/gshell/trunk/gshell-commands/gshell-ssh/src/main/java/org/apache/
geronimo/gshell/trunk/gshell-commands/gshell-ssh/src/main/java/org/apache/geronimo/
geronimo/gshell/trunk/gshell-commands/gshell-ssh/src/main/java/org/apache/geronimo/gshell/
geronimo/gshell/trunk/gshell-commands/gshell-ssh/src/main/java/org/apache/geronimo/gshell/commands/
geronimo/gshell/trunk/gshell-commands/gshell-ssh/src/main/java/org/apache/geronimo/gshell/commands/ssh/
geronimo/gshell/trunk/gshell-commands/gshell-ssh/src/main/java/org/apache/geronimo/gshell/commands/ssh/BogusPasswordAuthenticator.java (with props)
geronimo/gshell/trunk/gshell-commands/gshell-ssh/src/main/java/org/apache/geronimo/gshell/commands/ssh/ShellFactoryImpl.java (with props)
geronimo/gshell/trunk/gshell-commands/gshell-ssh/src/main/java/org/apache/geronimo/gshell/commands/ssh/SshServerAction.java (with props)
geronimo/gshell/trunk/gshell-commands/gshell-ssh/src/main/resources/
geronimo/gshell/trunk/gshell-commands/gshell-ssh/src/main/resources/META-INF/
geronimo/gshell/trunk/gshell-commands/gshell-ssh/src/main/resources/META-INF/gshell/
geronimo/gshell/trunk/gshell-commands/gshell-ssh/src/main/resources/META-INF/gshell/components.xml (with props)
geronimo/gshell/trunk/gshell-commands/gshell-ssh/src/main/resources/org/
geronimo/gshell/trunk/gshell-commands/gshell-ssh/src/main/resources/org/apache/
geronimo/gshell/trunk/gshell-commands/gshell-ssh/src/main/resources/org/apache/geronimo/
geronimo/gshell/trunk/gshell-commands/gshell-ssh/src/main/resources/org/apache/geronimo/gshell/
geronimo/gshell/trunk/gshell-commands/gshell-ssh/src/main/resources/org/apache/geronimo/gshell/commands/
geronimo/gshell/trunk/gshell-commands/gshell-ssh/src/main/resources/org/apache/geronimo/gshell/commands/ssh/
geronimo/gshell/trunk/gshell-commands/gshell-ssh/src/main/resources/org/apache/geronimo/gshell/commands/ssh/SshServerAction.properties (with props)
Modified:
geronimo/gshell/trunk/gshell-commands/pom.xml
Added: geronimo/gshell/trunk/gshell-commands/gshell-ssh/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-commands/gshell-ssh/pom.xml?rev=719815&view=auto
==============================================================================
--- geronimo/gshell/trunk/gshell-commands/gshell-ssh/pom.xml (added)
+++ geronimo/gshell/trunk/gshell-commands/gshell-ssh/pom.xml Fri Nov 21 22:52:25 2008
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<!-- $Rev$ $Date$ -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.geronimo.gshell.commands</groupId>
+ <artifactId>gshell-commands</artifactId>
+ <version>1.0-alpha-2-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>gshell-ssh</artifactId>
+ <name>GShell Commands :: SSH</name>
+
+ <description>
+ SSH support.
+ </description>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.geronimo.gshell</groupId>
+ <artifactId>gshell-application</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.geronimo.gshell.support</groupId>
+ <artifactId>gshell-spring</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.geronimo.gshell.support</groupId>
+ <artifactId>gshell-console</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>com.google.code.sshd</groupId>
+ <artifactId>sshd</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+
+</project>
\ No newline at end of file
Propchange: geronimo/gshell/trunk/gshell-commands/gshell-ssh/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/gshell/trunk/gshell-commands/gshell-ssh/pom.xml
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: geronimo/gshell/trunk/gshell-commands/gshell-ssh/pom.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: geronimo/gshell/trunk/gshell-commands/gshell-ssh/src/main/java/org/apache/geronimo/gshell/commands/ssh/BogusPasswordAuthenticator.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-commands/gshell-ssh/src/main/java/org/apache/geronimo/gshell/commands/ssh/BogusPasswordAuthenticator.java?rev=719815&view=auto
==============================================================================
--- geronimo/gshell/trunk/gshell-commands/gshell-ssh/src/main/java/org/apache/geronimo/gshell/commands/ssh/BogusPasswordAuthenticator.java (added)
+++ geronimo/gshell/trunk/gshell-commands/gshell-ssh/src/main/java/org/apache/geronimo/gshell/commands/ssh/BogusPasswordAuthenticator.java Fri Nov 21 22:52:25 2008
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.geronimo.gshell.commands.ssh;
+
+import com.google.code.sshd.server.PasswordAuthenticator;
+
+/**
+ * ???
+ *
+ * @version $Rev$ $Date$
+ */
+public class BogusPasswordAuthenticator
+ implements PasswordAuthenticator
+{
+ public Object authenticate(final String username, final String password) {
+ return (username != null && username.equals(password)) ? username : null;
+ }
+}
\ No newline at end of file
Propchange: geronimo/gshell/trunk/gshell-commands/gshell-ssh/src/main/java/org/apache/geronimo/gshell/commands/ssh/BogusPasswordAuthenticator.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/gshell/trunk/gshell-commands/gshell-ssh/src/main/java/org/apache/geronimo/gshell/commands/ssh/BogusPasswordAuthenticator.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: geronimo/gshell/trunk/gshell-commands/gshell-ssh/src/main/java/org/apache/geronimo/gshell/commands/ssh/BogusPasswordAuthenticator.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/gshell/trunk/gshell-commands/gshell-ssh/src/main/java/org/apache/geronimo/gshell/commands/ssh/ShellFactoryImpl.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-commands/gshell-ssh/src/main/java/org/apache/geronimo/gshell/commands/ssh/ShellFactoryImpl.java?rev=719815&view=auto
==============================================================================
--- geronimo/gshell/trunk/gshell-commands/gshell-ssh/src/main/java/org/apache/geronimo/gshell/commands/ssh/ShellFactoryImpl.java (added)
+++ geronimo/gshell/trunk/gshell-commands/gshell-ssh/src/main/java/org/apache/geronimo/gshell/commands/ssh/ShellFactoryImpl.java Fri Nov 21 22:52:25 2008
@@ -0,0 +1,245 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.geronimo.gshell.commands.ssh;
+
+import com.google.code.sshd.server.ShellFactory;
+import jline.Completor;
+import jline.History;
+import org.apache.geronimo.gshell.command.Variables;
+import org.apache.geronimo.gshell.commandline.CommandLineExecutor;
+import org.apache.geronimo.gshell.console.Console;
+import org.apache.geronimo.gshell.console.JLineConsole;
+import org.apache.geronimo.gshell.console.completer.AggregateCompleter;
+import org.apache.geronimo.gshell.io.Closer;
+import org.apache.geronimo.gshell.io.IO;
+import org.apache.geronimo.gshell.notification.ExitNotification;
+import org.apache.geronimo.gshell.shell.ShellContext;
+import org.apache.geronimo.gshell.shell.ShellContextHolder;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * ???
+ *
+ * @version $Rev$ $Date$
+ */
+public class ShellFactoryImpl
+ implements ShellFactory
+{
+ private final Logger log = LoggerFactory.getLogger(getClass());
+
+ private Console.Prompter prompter;
+
+ private CommandLineExecutor executor;
+
+ private History history;
+
+ private List<Completor> completers;
+
+ private Console.ErrorHandler errorHandler;
+
+ public Console.Prompter getPrompter() {
+ return prompter;
+ }
+
+ public void setPrompter(final Console.Prompter prompter) {
+ this.prompter = prompter;
+ }
+
+ public CommandLineExecutor getExecutor() {
+ return executor;
+ }
+
+ public void setExecutor(final CommandLineExecutor executor) {
+ this.executor = executor;
+ }
+
+ public History getHistory() {
+ return history;
+ }
+
+ public void setHistory(final History history) {
+ this.history = history;
+ }
+
+ public List<Completor> getCompleters() {
+ return completers;
+ }
+
+ public void setCompleters(final List<Completor> completers) {
+ this.completers = completers;
+ }
+
+ public Console.ErrorHandler getErrorHandler() {
+ return errorHandler;
+ }
+
+ public void setErrorHandler(final Console.ErrorHandler errorHandler) {
+ this.errorHandler = errorHandler;
+ }
+
+ public Shell createShell() {
+ return new ShellImpl();
+ }
+
+ public class ShellImpl
+ implements ShellFactory.DirectShell, org.apache.geronimo.gshell.shell.Shell, ShellContext, Runnable
+ {
+ private InputStream in;
+
+ private OutputStream out;
+
+ private OutputStream err;
+
+ private IO io;
+
+ private Variables variables;
+
+ private boolean closed;
+
+ public void setInputStream(final InputStream in) {
+ this.in = in;
+ }
+
+ public void setOutputStream(final OutputStream out) {
+ this.out = out;
+ }
+
+ public void setErrorStream(final OutputStream err) {
+ this.err = err;
+ }
+
+ public void start(final Map<String,String> env) throws IOException {
+ this.io = new IO(in, out, err, false);
+ this.variables = new Variables((Map)env);
+ new Thread(this).start();
+ }
+
+ public boolean isAlive() {
+ return !closed;
+ }
+
+ public int exitValue() {
+ if (!closed) {
+ throw new IllegalThreadStateException();
+ }
+ return 0;
+ }
+
+ public void destroy() {
+ close();
+ }
+
+ public ShellContext getContext() {
+ return this;
+ }
+
+ public Object execute(final String line) throws Exception {
+
+ return executor.execute(getContext(), line);
+ }
+
+ public Object execute(final String command, final Object[] args) throws Exception {
+ return executor.execute(getContext(), args);
+ }
+
+ public Object execute(final Object... args) throws Exception {
+ return executor.execute(getContext(), args);
+ }
+
+ public boolean isOpened() {
+ return !closed;
+ }
+
+ public void close() {
+ closed = true;
+ Closer.close(in, out, err);
+ }
+
+ public boolean isInteractive() {
+ return false;
+ }
+
+ public void run(final Object... args) throws Exception {
+ Console.Executor executor = new Console.Executor()
+ {
+ public Result execute(final String line) throws Exception {
+ assert line != null;
+ try {
+ ShellImpl.this.execute(line);
+ }
+ catch (ExitNotification n) {
+ return Result.STOP;
+ }
+ return Result.CONTINUE;
+ }
+ };
+
+ IO io = getContext().getIo();
+
+ // Setup the console runner
+ JLineConsole console = new JLineConsole(executor, io);
+ console.setPrompter(getPrompter());
+ console.setErrorHandler(getErrorHandler());
+ console.setHistory(getHistory());
+
+ if (completers != null) {
+ // Have to use aggregate here to get the completion list to update properly
+ console.addCompleter(new AggregateCompleter(completers));
+ }
+
+ console.run();
+ }
+
+ public org.apache.geronimo.gshell.shell.Shell getShell() {
+ return this;
+ }
+
+ public IO getIo() {
+ return io;
+ }
+
+ public Variables getVariables() {
+ return variables;
+ }
+
+ public void run() {
+ ShellContext ctx = ShellContextHolder.get(true);
+
+ try {
+ ShellContextHolder.set(getContext());
+ run(new Object[0]);
+ }
+ catch (Exception e) {
+ log.error("Unhandled failure: " + e, e);
+ }
+ finally {
+ ShellContextHolder.set(ctx);
+ close();
+ }
+ }
+ }
+}
\ No newline at end of file
Propchange: geronimo/gshell/trunk/gshell-commands/gshell-ssh/src/main/java/org/apache/geronimo/gshell/commands/ssh/ShellFactoryImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/gshell/trunk/gshell-commands/gshell-ssh/src/main/java/org/apache/geronimo/gshell/commands/ssh/ShellFactoryImpl.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: geronimo/gshell/trunk/gshell-commands/gshell-ssh/src/main/java/org/apache/geronimo/gshell/commands/ssh/ShellFactoryImpl.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/gshell/trunk/gshell-commands/gshell-ssh/src/main/java/org/apache/geronimo/gshell/commands/ssh/SshServerAction.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-commands/gshell-ssh/src/main/java/org/apache/geronimo/gshell/commands/ssh/SshServerAction.java?rev=719815&view=auto
==============================================================================
--- geronimo/gshell/trunk/gshell-commands/gshell-ssh/src/main/java/org/apache/geronimo/gshell/commands/ssh/SshServerAction.java (added)
+++ geronimo/gshell/trunk/gshell-commands/gshell-ssh/src/main/java/org/apache/geronimo/gshell/commands/ssh/SshServerAction.java Fri Nov 21 22:52:25 2008
@@ -0,0 +1,84 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.geronimo.gshell.commands.ssh;
+
+import com.google.code.sshd.SshServer;
+import org.apache.geronimo.gshell.clp.Option;
+import org.apache.geronimo.gshell.command.CommandAction;
+import org.apache.geronimo.gshell.command.CommandContext;
+import org.apache.geronimo.gshell.i18n.MessageSource;
+import org.apache.geronimo.gshell.io.IO;
+import org.apache.geronimo.gshell.spring.BeanContainer;
+import org.apache.geronimo.gshell.spring.BeanContainerAware;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Start a SSH server.
+ *
+ * @version $Rev$ $Date$
+ */
+public class SshServerAction
+ implements CommandAction, BeanContainerAware
+{
+ private final Logger log = LoggerFactory.getLogger(getClass());
+
+ @Option(name="-p", aliases={ "--port" })
+ private int port;
+
+ @Option(name="-b", aliases={ "--background"})
+ private boolean background;
+
+ private BeanContainer container;
+
+ public void setBeanContainer(final BeanContainer container) {
+ assert container != null;
+
+ this.container = container;
+ }
+
+ public Object execute(final CommandContext context) throws Exception {
+ assert context != null;
+ IO io = context.getIo();
+ MessageSource messages = context.getCommand().getMessages();
+
+ SshServer server = container.getBean("sshServer", SshServer.class);
+
+ log.debug("Created server: {}", server);
+
+ server.setPort(port);
+
+ server.start();
+
+ io.info(messages.format("info.listening", port));
+
+ if (!background) {
+ synchronized (this) {
+ log.debug("Waiting for server to shutdown");
+
+ wait();
+ }
+
+ server.stop();
+ }
+
+ return Result.SUCCESS;
+ }
+}
\ No newline at end of file
Propchange: geronimo/gshell/trunk/gshell-commands/gshell-ssh/src/main/java/org/apache/geronimo/gshell/commands/ssh/SshServerAction.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/gshell/trunk/gshell-commands/gshell-ssh/src/main/java/org/apache/geronimo/gshell/commands/ssh/SshServerAction.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: geronimo/gshell/trunk/gshell-commands/gshell-ssh/src/main/java/org/apache/geronimo/gshell/commands/ssh/SshServerAction.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/gshell/trunk/gshell-commands/gshell-ssh/src/main/resources/META-INF/gshell/components.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-commands/gshell-ssh/src/main/resources/META-INF/gshell/components.xml?rev=719815&view=auto
==============================================================================
--- geronimo/gshell/trunk/gshell-commands/gshell-ssh/src/main/resources/META-INF/gshell/components.xml (added)
+++ geronimo/gshell/trunk/gshell-commands/gshell-ssh/src/main/resources/META-INF/gshell/components.xml Fri Nov 21 22:52:25 2008
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<!-- $Rev$ $Date$ -->
+
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:gshell="http://gshell.org/schema/wisdom-gshell"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://gshell.org/schema/wisdom-gshell http://gshell.org/schema/wisdom-gshell/wisdom-gshell.xsd"
+ default-autowire="no"
+ default-dependency-check="none"
+ default-init-method="init"
+ default-destroy-method="destroy">
+
+ <gshell:plugin name="gshell-ssh">
+ <gshell:command-bundle name="default">
+ <gshell:command name="ssh-server">
+ <gshell:action class="org.apache.geronimo.gshell.commands.ssh.SshServerAction"/>
+ </gshell:command>
+
+ <gshell:link name="sshd" target="ssh-server"/>
+ </gshell:command-bundle>
+ </gshell:plugin>
+
+ <bean name="sshServer" class="com.google.code.sshd.SshServer" factory-method="setUpDefaultServer" scope="prototype">
+ <property name="shellFactory">
+ <bean class="org.apache.geronimo.gshell.commands.ssh.ShellFactoryImpl">
+ <property name="completers">
+ <list>
+ <ref bean="commandsCompleter"/>
+ <ref bean="aliasNameCompleter"/>
+ </list>
+ </property>
+ <property name="executor" ref="commandLineExecutor"/>
+ <property name="prompter">
+ <bean class="org.apache.geronimo.gshell.wisdom.shell.ConsolePrompterImpl">
+ <constructor-arg ref="application"/>
+ </bean>
+ </property>
+ <property name="errorHandler">
+ <bean class="org.apache.geronimo.gshell.wisdom.shell.ConsoleErrorHandlerImpl"/>
+ </property>
+ <property name="history">
+ <bean class="org.apache.geronimo.gshell.wisdom.shell.HistoryImpl">
+ <constructor-arg ref="application"/>
+ </bean>
+ </property>
+ </bean>
+ </property>
+ <property name="keyPairProvider" ref="keyPairProvider"/>
+ <property name="passwordAuthenticator" ref="passwordAuthenticator"/>
+ </bean>
+
+ <bean name="keyPairProvider" class="com.google.code.sshd.server.keyprovider.SimpleGeneratorHostKeyProvider"/>
+
+ <bean name="passwordAuthenticator" class="org.apache.geronimo.gshell.commands.ssh.BogusPasswordAuthenticator"/>
+
+</beans>
\ No newline at end of file
Propchange: geronimo/gshell/trunk/gshell-commands/gshell-ssh/src/main/resources/META-INF/gshell/components.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/gshell/trunk/gshell-commands/gshell-ssh/src/main/resources/META-INF/gshell/components.xml
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: geronimo/gshell/trunk/gshell-commands/gshell-ssh/src/main/resources/META-INF/gshell/components.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: geronimo/gshell/trunk/gshell-commands/gshell-ssh/src/main/resources/org/apache/geronimo/gshell/commands/ssh/SshServerAction.properties
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-commands/gshell-ssh/src/main/resources/org/apache/geronimo/gshell/commands/ssh/SshServerAction.properties?rev=719815&view=auto
==============================================================================
--- geronimo/gshell/trunk/gshell-commands/gshell-ssh/src/main/resources/org/apache/geronimo/gshell/commands/ssh/SshServerAction.properties (added)
+++ geronimo/gshell/trunk/gshell-commands/gshell-ssh/src/main/resources/org/apache/geronimo/gshell/commands/ssh/SshServerAction.properties Fri Nov 21 22:52:25 2008
@@ -0,0 +1,34 @@
+##
+## Licensed to the Apache Software Foundation (ASF) under one
+## or more contributor license agreements. See the NOTICE file
+## distributed with this work for additional information
+## regarding copyright ownership. The ASF licenses this file
+## to you under the Apache License, Version 2.0 (the
+## "License"); you may not use this file except in compliance
+## with the License. You may obtain a copy of the License at
+##
+## http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing,
+## software distributed under the License is distributed on an
+## "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+## KIND, either express or implied. See the License for the
+## specific language governing permissions and limitations
+## under the License.
+##
+
+##
+## $Rev$ $Date$
+##
+
+command.description=Start a SSH server.
+
+command.option.port=Listen for SSH connections on PORT
+command.option.port.token=PORT
+
+command.option.background=Run in background
+
+command.manual=\
+ TODO: ssh-server manual
+
+info.listening=Listening on: {0}
\ No newline at end of file
Propchange: geronimo/gshell/trunk/gshell-commands/gshell-ssh/src/main/resources/org/apache/geronimo/gshell/commands/ssh/SshServerAction.properties
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/gshell/trunk/gshell-commands/gshell-ssh/src/main/resources/org/apache/geronimo/gshell/commands/ssh/SshServerAction.properties
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: geronimo/gshell/trunk/gshell-commands/gshell-ssh/src/main/resources/org/apache/geronimo/gshell/commands/ssh/SshServerAction.properties
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: geronimo/gshell/trunk/gshell-commands/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-commands/pom.xml?rev=719815&r1=719814&r2=719815&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-commands/pom.xml (original)
+++ geronimo/gshell/trunk/gshell-commands/pom.xml Fri Nov 21 22:52:25 2008
@@ -67,6 +67,7 @@
<module>gshell-vfs</module>
<module>gshell-remote</module>
<module>gshell-log4j</module>
+ <module>gshell-ssh</module>
</modules>
</project>
\ No newline at end of file