SSH Access through Eclipse RSE
I wrote an article on how to install Eclipse RSE (Remote System Explorer), and how to access Eclipse DStore agent using Eclipse RSE. Since then I also explored how to access SSH servers as most of our environments are only SSH enabled. It would be convenient if I can access the remote system using SSH within Eclipse while I am working on projects. I shall be able to run any commands that are supported by my system through Eclipse RSE, and I should also be able to execute programs that I am working on from within Eclipse through Eclipse RSE. According to what I tried so for, that’s what Eclipse RSE is going to do for you. With these features (such as browsing files, shell and terminal, and even FTP) you don’t have to open any extra windows/terminals on your desktop. One concern of Eclipse is memory usage which may be very big, so for I haven’t yet. Ok, let’s start the session.
- First make sure you install Eclipse Ganymede for J2EE. Follow this link to install Eclipse RSE
- Make sure you have an SSH account. If you don’t have it, you need to consult your system administrator. Or you can install a local SSH server, you can get a copy of SSH server from SSH for Win32. Use Putty to confirm that you can access your SSH server if you haven’t done so.
- Start Eclipse
- Let’s first bring up the RSE Explorer, go to Eclipse Window -> Open Perspective -> Remote System Explorer, if you don’t see it, then do Eclipse Window -> Open Perspective -> Other. From Open Perspective dialog select Remote System Explorer and click OK
- Now you should see a default “Local” Connector Service in Eclipse RSE explorer, from here you can navigate through your local systems such as home, and different drives
- Let’s right click Remote Systems panel and choose New -> Connection from the popup menu
- There are a few remote system types available in select remote system types dialog, select SSH Only
- On “Remote SSH Only System Connection” dialog, fill in the necessary information such as hostname and connection name, either click Next or Finish. If you want to modify settings for SFTP, Shell and Terminal, then click Next, otherwise, Click Finish
- Now your eclipse RSE will look like this:
- Select the Connector node you just created from Remote Systems panel and choose “connect”, this will pop up Enter Password dialog. Enter your username and password and click OK. You should now be logged in
- Your Remote Systems panel should now look like the following, note the little green arrows appear for SFTP, Shells and Terminals nodes, that means you are logged onto your SSH server, and you should be able to access your system through Eclipse RSE now
- Right click either Shells or Terminals and choose Launch Shell/Terminal. A new Remote Shell or Terminal should appear (see next 2 images for details). Now you can type in any commands just like you are in your favorite terminals
- To quit remote shell, you can just click on the red square button on the top right corner of the shell panel. Or expand Shells or Terminals nodes to select the shell/terminal node to cancel or remove
- To disconnect from your SSH server, right click the connector service node in Remote Systems panel and choose disconnect, this will end your SSH connection
With Eclipse RSE, you can also remotely create files, open/edit and save them from within Eclipse. Eclipse knows what editors to use to open the files for you.
You can find the detailed documentation from within your Eclipse or here