[
https://issues.apache.org/jira/browse/SSHD-473?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14568628#comment-14568628
]
Goldstein Lyor commented on SSHD-473:
-------------------------------------
{quote}But furthermorer is strange , that I've a message box in my
authentificator, which is never shown.{quote}
If you are running _Linux_ then it is most likely a *headless* server - i.e.,
no message boxes will be shown. Furthermore, if you want to show message boxes
in _Java_ you need to initialize the _Swing_ framework (which is another
ballgame altogether).
{quote}it may be,that additionally the LINUX-Box is making trouble{quote}
There is no problem with either _Linux_ or _Windows_ - the _Java_ code is
agnostic. The only issue may be the *port* number - make sure that you use a
port number > 1024 (for _Linux_) - unless you want to run your application with
(temporary) _root_ permissions (again, a whole new ballgame).
{quote}On both system I've started sshd with 'service sshd start'{quote}
This has *nothing* to do with the _Java_ code - you started the *Linux* SSH
daemon and *not* the _Java_ code. Again, make sure you are starting the
*_Java_* code and your client is connecting to the correct *port* that your
_Java_ code is listening on.
{quote}I'm trying to get an well working solution to establish a long time
opened SSH with IP-Forwarding at both sides.{quote}
Then this has nothing to do with shell channels but rather with port forwarding
- which is *disabled* by default in the _Java_ server code. To allow it, you
need the following extra setting:
{code:java}
sshd = SshServer.setUpDefaultServer();
sshd.setPasswordAuthenticator(...something that implements the
PasswordAuthenticator interface...);
sshd.setPublickeyAuthenticator(...something that implements the
PublickeyAuthenticator interface...);
sshd.setTcpipForwardingFilter(...implement the relevant interface and return
true where applicable...);
{code}
{quote}I can't see what the server code is doing{quote}
Turn on the _log4j_ logging in your _main_ code (the _Java_ code use _slf4j_ so
you need to have _slf4j-log4j_ and _log4j_ on your _classpath_). You can also
debug the code with _Eclipse_ (or your favorite IDE).
{quote}All these results are slightly confusing{quote}
Sorry, can't help beyond what I have done so far...
> PasswordAuthentifikation
> ------------------------
>
> Key: SSHD-473
> URL: https://issues.apache.org/jira/browse/SSHD-473
> Project: MINA SSHD
> Issue Type: Bug
> Affects Versions: 0.14.0
> Environment: Windows 7, Java 8, Eclipse JUNO
> Reporter: Jochen Seliger
> Priority: Critical
>
> I run the sshd and the ssh client both on the windos mashine.
> The sshd I start on port 8000 and with password authentificator ans an own
> atthenicator class, which shall shoe a messagebox when envoced.
> The client I start aftercreating it as SshClient.setUpDefaultClient();
> without stting any factury with the statement ClientSession session =
> client.connect("Jochen","192.168.100.13",8000).await().getSession(); (Jochen
> is an existing user on the mashine).
> But till shellChannel I can proceed only when setting after session creation
> session.addPasswordIdentity("Jochen"); (it is tha same user as provided at
> session creation)
> There is no functionality to set the password.
> The method authPassword is depreciated.
> 1. My first question: How to proceed th use PasswordAuthentification?
> As stated I can proceesd til ssh-Shell, but the server is logging at a first
> run an autentification failure and at a second run authentification success:
> Mai 22, 2015 12:14:21 PM org.apache.sshd.client.session.ClientSessionImpl
> readIdentification
> INFORMATION: Server version string: SSH-2.0-SSHD-CORE-0.14.0
> Mai 22, 2015 12:14:22 PM
> org.apache.sshd.client.keyverifier.AcceptAllServerKeyVerifier verifyServerKey
> WARNUNG: Server at /192.168.100.13:8000 presented unverified DSA key:
> e4:76:f3:c2:15:64:7f:e4:5f:b7:86:35:a5:3e:85:35
> Mai 22, 2015 12:14:22 PM org.apache.sshd.common.session.AbstractSession
> doHandleMessage
> INFORMATION: Dequeing pending packets
> Mai 22, 2015 12:14:22 PM
> org.apache.sshd.client.session.ClientUserAuthServiceNew processUserAuth
> INFORMATION: Received SSH_MSG_USERAUTH_FAILURE
> Mai 22, 2015 12:14:22 PM
> org.apache.sshd.client.auth.UserAuthKeyboardInteractive process
> INFORMATION: Received Password authentication en-US
> Mai 22, 2015 12:14:22 PM
> org.apache.sshd.client.session.ClientUserAuthServiceNew processUserAuth
> INFORMATION: Received SSH_MSG_USERAUTH_SUCCESS
> ShellChannell opened
> Microsoft Windows [Version 6.0.6001]
> Copyright (c) 2006 Microsoft Corporation. Alle Rechte vorbehalten.
> C:\Users\Jochen\workspace\USF_SSH_WS>
> allthoug I did not provide an password.
> 2. Why thes two runs are processed?
> 3. Why the first run fails and the second one succedes?
> 4. How to proceede to get a functioning password and keypair authentication?
> Regards
> Jochen Seliger
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)