Work on a remote project with Eclipse via SSH

I have the following boxes:

  • A Windows box with Eclipse CDT,
  • A Linux box, accessible for me only via SSH.
  • Both the compiler and the hardware required to build and run my project is only on machine B.

    I'd like to work "transparently" from a Windows box on that project using Eclipse CDT and be able to build, run and debug the project remotely from within the IDE.

    How do I set up that:

  • The building will work? Any simpler solutions than writing a local makefile which would rsync the project and then call a remote makefile to initiate the actual build? Does Eclipse managed build have a feature for that?
  • The debugging will work?
  • Preferably - the Eclipse CDT code indexing will work? Do I have to copy all required header files from machine B to machine A and add them to include path manually?

  • Try the Remote System Explorer (RSE). It's a set of plug-ins to do exactly what you want.

    RSE may already be included in your current Eclipse installation. To check in Eclipse Indigo go to Window > Open Perspective > Other... and choose Remote System Explorer from the Open Perspective dialog to open the RSE perspective.

    To create an SSH remote project from the RSE perspective in Eclipse:

  • Define a new connection and choose SSH Only from the Select Remote System Type screen in the New Connection dialog.
  • Enter the connection information then choose Finish.
  • Connect to the new host. (Assumes SSH keys are already setup.)
  • Once connected, drill down into the host's Sftp Files, choose a folder and select Create Remote Project from the item's context menu. (Wait as the remote project is created.)
  • If done correctly, there should now be a new remote project accessible from the Project Explorer and other perspectives within eclipse. With the SSH connection set-up correctly passwords can be made an optional part of the normal SSH authentication process. A remote project with Eclipse via SSH is now created.


    The very simplest way would be to run Eclipse CDT on the Linux Box and use either X11-Forwarding or remote desktop software such as VNC.

    This, of course, is only possible when you Eclipse is present on the Linux box and your network connection to the box is sufficiently fast.

    The advantage is that, due to everything being local, you won't have synchronization issues, and you don't get any awkward cross-platform issues.

    If you have no eclipse on the box, you could thinking of sharing your linux working directory via SMB (or SSHFS) and access it from your windows machine, but that would require quite some setup.

    Both would be better than having two copies, especially when it's cross-platform.


    I'm in the same spot myself (or was), FWIW I ended up checking out to a samba share on the Linux host and editing that share locally on the Windows machine with notepad++, then I compiled on the Linux box via PuTTY. (We weren't allowed to update the ten y/o versions of the editors on the Linux host and it didn't have Java, so I gave up on X11 forwarding)

    Now... I run modern Linux in a VM on my Windows host, add all the tools I want (eg CDT) to the VM and then I checkout and build in a chroot jail that closely resembles the RTE.

    It's a clunky solution but I thought I'd throw it in to the mix.

    链接地址: http://www.djcxy.com/p/29598.html

    上一篇: 即使指定了1.5,Maven也会使用Java 1.6构建项目

    下一篇: 通过SSH使用Eclipse处理远程项目