Accepted answer

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:

  1. define a new connection and choose ssh only from the select remote system type screen in the new connection dialog.
  2. enter the connection information then choose finish.
  3. connect to the new host. (assumes ssh keys are already setup.)
  4. 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.


for this case you can use ptp eclipse for source browsing and building.

you can use this pluging to debug your application


how to edit in eclipse locally, but use a git-based script i wrote ( to synchronize and build remotely

this answer currently only applies to using two linux computers [or maybe works on mac too?--untested on mac] (syncing from one to the other) because i wrote this synchronization script in bash. it is simply a wrapper around git, however, so feel free to take it and convert it into a cross-platform python solution or something if you wish

this doesn't directly answer the op's question, but it is so close i guarantee it will answer many other peoples' question who land on this page (mine included, actually, as i came here first before writing my own solution), so i'm posting it here anyway.

i want to:

  1. develop code using a powerful ide like eclipse on a light-weight linux computer, then
  2. build that code via ssh on a different, more powerful linux computer (from the command-line, not from inside eclipse)

let's call the first computer where i write the code "pc1" (personal computer 1), and the 2nd computer where i build the code "pc2". i need a tool to easily synchronize from pc1 to pc2. i tried rsync, but it was insanely slow for large repos and took tons of bandwidth and data.

so, how do i do it? what workflow should i use? if you have this question too, here's the workflow that i decided upon. i wrote a bash script to automate the process by using git to automatically push changes from pc1 to pc2 via a remote repository, such as github. so far it works very well and i'm very pleased with it. it is far far far faster than rsync, more trustworthy in my opinion because each pc maintains a functional git repo, and uses far less bandwidth to do the whole sync, so it's easily doable over a cell phone hot spot without using tons of your data.


  1. install the script on pc1 (this solution assumes ~/bin is in your $path):

     git clone
     cd ercaguy_dotfiles/useful_scripts
     mkdir -p ~/bin
     ln -s "${pwd}/" ~/bin/sync_git_repo_from_pc1_to_pc2
     cd ..
     cp -i .sync_git_repo ~/.sync_git_repo
  2. now edit the "~/.sync_git_repo" file you just copied above, and update its parameters to fit your case. here are the parameters it contains:

     # the git repo root directory on pc2 where you are syncing your files to; this dir must *already exist* 
     # and you must have *already `git clone`d* a copy of your git repo into it!
     # - do not use variables such as `$home`. be explicit instead. this is because the variable expansion will 
     #   happen on the local machine when what we need is the variable expansion from the remote machine. being 
     #   explicit instead just avoids this problem.
     pc2_git_repo_target_dir="/home/gabriel/dev/ercaguy_dotfiles" # explicitly type this out; don't use variables
     pc2_ssh_username="my_username" # explicitly type this out; don't use variables
     pc2_ssh_host="my_hostname"     # explicitly type this out; don't use variables
  3. git clone your repo you want to sync on both pc1 and pc2.

  4. ensure your ssh keys are all set up to be able to push and pull to the remote repo from both pc1 and pc2. here's some helpful links:

  5. ensure your ssh keys are all set up to ssh from pc1 to pc2.

  6. now cd into any directory within the git repo on pc1, and run:

  7. that's it! about 30 seconds later everything will be magically synced from pc1 to pc2, and it will be printing output the whole time to tell you what it's doing and where it's doing it on your disk and on which computer. it's safe too, because it doesn't overwrite or delete anything that is uncommitted. it backs it up first instead! read more below for how that works.

here's the process this script uses (ie: what it's actually doing)

  1. from pc1: it checks to see if any uncommitted changes are on pc1. if so, it commits them to a temporary commit on the current branch. it then force pushes them to a remote sync branch. then it uncommits its temporary commit it just did on the local branch, then it puts the local git repo back to exactly how it was by staging any files that were previously staged at the time you called the script. next, it rsyncs a copy of the script over to pc2, and does an ssh call to tell pc2 to run the script with a special option to just do pc2 stuff.
  2. here's what pc2 does: it cds into the repo, and checks to see if any local uncommitted changes exist. if so, it creates a new backup branch forked off of the current branch (sample name: my_branch_sync_bak_20200220-0028hrs-15sec <-- notice that's yyyymmdd-hhmmhrs--sssec), and commits any uncommitted changes to that branch with a commit message such as do backup of all uncommitted changes on pc2 (target pc/build machine). now, it checks out the sync branch, pulling it from the remote repository if it is not already on the local machine. then, it fetches the latest changes on the remote repository, and does a hard reset to force the local sync repository to match the remote sync repository. you might call this a "hard pull". it is safe, however, because we already backed up any uncommitted changes we had locally on pc2, so nothing is lost!
  3. that's it! you now have produced a perfect copy from pc1 to pc2 without even having to ensure clean working directories, as the script handled all of the automatic committing and stuff for you! it is fast and works very well on huge repositories. now you have an easy mechanism to use any ide of your choice on one machine while building or testing on another machine, easily, over a wifi hot spot from your cell phone if needed, even if the repository is dozens of gigabytes and you are time and resource-constrained.


  1. the whole project:
  2. see tons more links and references in the source code itself within this project.
  3. how to do a "hard pull", as i call it: git: how do i force "git pull" to overwrite local files?


  1. git repository sync between computers, when moving around?


the way i solved that one was:

for windows:

  1. export the 'workspace' directory from the linux machine using samba.
  2. mount it locally in windows.
  3. run eclipse, using the mounted 'workspace' directory as the eclipse workspace.
  4. import the project you want and work on it.

for linux:

  1. mount the 'workspace' directory using sshfs
  2. run eclipse.
  3. run eclipse, using the mounted 'workspace' directory as the eclipse workspace.
  4. import the project you want and work on it.

in both cases you can either build and run through eclipse, or build on the remote machine via ssh.


i had the same problem 2 years ago and i solved it in the following way:

1) i build my projects with makefiles, not managed by eclipse 2) i use a samba connection to edit the files inside eclipse 3) building the project: eclipse calles a "local" make with a makefile which opens a ssh connection to the linux host. on the ssh command line you can give parameters which are executed on the linux host. i use for that parameter a shell script which call the "real" make on the linux host. the different targets for building you can give also by parameters from the local makefile --> --> makefile on linux host.


i tried ssh -x but it was unbearably slow.

i also tried rse, but it didn't even support building the project with a makefile (i'm being told that this has changed since i posted my answer, but i haven't tried that out)

i read that nx is faster than x11 forwarding, but i couldn't get it to work.

finally, i found out that my server supports x2go (the link has install instructions if yours does not). now i only had to:

  • download and unpack eclipse on the server,
  • install x2go on my local machine (sudo apt-get install x2goclient on ubuntu),
  • configure the connection (host, auto-login with ssh key, choose to run eclipse).

everything is just as if i was working on a local machine, including building, debugging, and code indexing. and there are no noticeable lags.


my solution is similar to the samba one except using sshfs. mount my remote server with sshfs, open my makefile project on the remote machine. go from there.

it seems i can run a gui frontend to mercurial this way as well.

building my remote code is as simple as: ssh address remote_make_command

i am looking for a decent way to debug though. possibly via gdbserver?


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 (e.g. 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.


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.

Related Query

More Query from same tag