Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ptp-user] Eclipse PTP with Apache SSHD

Hi Greg,

I want to use PTP tools to do remote development. I am not allowed to download the source code to my PC. So I wanted to use the PTP plug-in.

The remote system is Linux and the SSH server is Apache SSHD.
This is what I did.

Step1: Open Remote Environments and enter the remote server details
Step2: Click Start button in the Remote Environment.
Step3: Got the banner from SSH server “Welcome to Apache SSHD server”

After that, PTP sends “/bin/sh “ command to the server. But there is no response from the server.

Extracted from the Apache SSHD log,

Starting SSHD on port 8000
766 [main] INFO org.apache.sshd.common.util.SecurityUtils - Trying to register BouncyCastle as a JCE provider
2212 [main] INFO org.apache.sshd.common.util.SecurityUtils - Registration succeeded
53266 [pool-2-thread-1] INFO org.apache.sshd.server.session.ServerSession - Session created from /172.20.56.51:4872
53455 [pool-2-thread-2] INFO org.apache.sshd.server.session.ServerSession - Session user@/172.20.56.51:4872 authenticated
54773 [pool-2-thread-2] INFO org.apache.sshd.server.channel.ChannelSession - Executing command: /bin/sh

On Eclipse, I do not see any response either, the ‘Start Environment’ command is still running.

So to debug, I have created an editor configuration and started that ‘editor’.

I found that it hangs at below block in org.eclipse.ptp.remotetools.internal.ssh.ControlChannel

// Wait until the channel answers the terminal path
Debug.println2(Messages.ControlChannel_Debug_StartedWaitingControlTerminalPath);
synchronized (this) {
       while (!monitor.isCanceled() && controlTerminalPath == null) {
              try {
                     this.wait(200);
              } catch (InterruptedException e) {
                     throw new RemoteConnectionException(Messages.ControlChannel_Open_WaitControlTerminalPathInterrupted, e);
              }
       }
}
if (monitor.isCanceled()) {
       close();
       throw new RemoteConnectionException(Messages.ControlChannel_Open_WaitControlTerminalPathInterrupted);
}
Debug.println2(Messages.ControlChannel_Debug_ReceivedControlTerminalPath + controlTerminalPath);

I am not sure what should be the response from the server to break this loop. So I am checking whether is any alternative implementation for this ControlChannel.

If I connect from putty, I am able to browse the server, use SFTP etc.

Thanks and Regards,
ravi


>
>
> ------------------------------
>
> Message: 2
> Date: Mon, 11 Nov 2013 07:58:53 -0500
> From: Greg Watson <g.watson@xxxxxxxxxxxx>
> To: PTP User list <ptp-user@xxxxxxxxxxx>
> Subject: Re: [ptp-user] Eclipse PTP with Apache SSHD
> Message-ID: <8C69F68B-C214-4A3A-9B5F-32D787DCD103@xxxxxxxxxxxx>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Can you explain more about what you're doing? Are you using the remote API? The process builder should not be allocating a PTY unless the ALLOCATE_PTY flag is used.
>
> There is no way to open a command shell currently. I've added an IRemoteConnection#getCommandShell() method in the master branch (Luna), but it is not currently implemented.
>
> Regards,
> Greg
>
> On Nov 5, 2013, at 1:56 AM, ravi ramesh <rawdump@xxxxxxxxx> wrote:
>
> > Hi all,
> >
> > I am trying to integrate Eclipse PTP Remote tools plugin with Apache SSHD server (I want to use my custom shell).
> >
> > The SSH connection in the PTP API will connect to the SSH server and read the $SSH_TTY variable to get the psuedo-terminal path (eg: /dev/pts/3). Once it gets the path, all the subsequent commands are directed to that terminal.
> >
> > This works with the openSSH installation or Tectia Server, but doesn't work with the Apache SSHD server.
> >
> > Is there an alternate implementation where the connection is maintained over a shell instead of asking for and using a pseudo-terminal?
> >
> > Please help.
> >
> > Thank you
> > Ravi
> >
> > _______________________________________________
> > ptp-user mailing list
> > ptp-user@xxxxxxxxxxx
> > https://dev.eclipse.org/mailman/listinfo/ptp-user
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <https://dev.eclipse.org/mailman/private/ptp-user/attachments/20131111/b0ed1111/attachment.html>
>
> ------------------------------
>
> _______________________________________________
> ptp-user mailing list
> ptp-user@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/ptp-user
>
>
> End of ptp-user Digest, Vol 84, Issue 5
> ***************************************


Back to the top