Hi.
I have to apply to the project Mina SSHD.
Code is as follows::
---------------------------------------------------------------------------------------------
sshd.setShellFactory(new ProcessShellFactory(new String[]{"/bin/sh",
"-i", "-l"},
EnumSet.of(ProcessShellFactory.TtyOptions.ONlCr)));
CommandFactory delegateCommandFactory = new CommandFactory(){
public Command createCommand(String command){
System.out.println("command:::"+command);
return new ShellCommand(command);
}
};
sshd.setCommandFactory(new ScpCommandFactory(delegateCommandFactory));
-------------------------------------------------------------------------------------------------
After Public key authentication, I want to execute /bin/sh as using
setShellFactory method.
If I test code, authentication is successed, and $ appeared.
00000@000000001 ~
$ ssh [email protected] -p 8001
$
But Any command not work.
It does not seem to even write letters.
Please share if you know.
thank you
Note that, OpenSSh server is working in 22 port and i execute my MINA SSHD
server in 8001 port.
--
View this message in context:
http://apache-mina.10907.n7.nabble.com/When-connecting-to-SSH-the-shell-does-not-work-after-authentication-tp39980.html
Sent from the Apache MINA User Forum mailing list archive at Nabble.com.