Feb 7, 2017

f Comment

[SOLVED] Eclipse: Remote System Explorer SSH Connection Shows No Files! Fix it!

Amazon If you use a cloud service to host your website or web app, you may want to use the Eclipse IDE to edit your files on your remote host. When you use the "Remote System Explorer" perspective to create a connection for SSH access to remote systems, you may encounter a problem where there are no files under the subsystem "Sftp Files".

What's wrong? You know you have many files in the home directory of your remote box. You can use Putty to ssh into your remote machine and see those files. But you can't with Eclipse. It's showing an empty list of files although it's connected successfully.

This tutorial will tell you why you see no files in Eclipse's Remote Systems pane under the subsystem "Sftp Files" and how to fix this problem.

My Eclipse version is Eclipse for PHP Developers. Version: Helios Service Release 2. Build id: 20110218-0911

This tutorial may fix the same issue for other types of connections such as FTP. The concept is the same: Use filter to see remote files.

Why is Eclipse showing no files on my remote server?

In Eclipse, a connection uses filter pools, and a filter pool has one or more filters. The subsystem "Sftp Files" comes with a set of default filters. Each filter defines a folder and a file filter which together decide what files are shown in Eclipse's Remote Systems pane. In my Eclipse, there are two default filters that come with SSH access:

1. My Home: This is the home directory of your remote host.
2. Root: This is the root folder on your remote host, which is denoted as a / (slash).

So when you see no filters under "Sftp Files", it's probably because either you accidentally removed them or there's something wrong with Eclipse. But don't worry. I'll help you fix this problem.

Make Eclipse show files on my remote server.

If you host a website on your remote server, chances are your website's document root is not your home directory but something like /usr/share/nginx/html. Suppose you want to edit files in that directory, simply create a filter for it by following these steps:

1. Right click on "Sftp Files" and select New -> Filter...

2. In the Folder text field, type "/usr/share/nginx/html".

3. In the text field under the radio button "Subset by file name", type "*".

This means you want to browse all files under the directory /usr/share/nginx/html.

4. Press Next and give the filter a name like "HTML Home". Then press Finish.

A new filter should be created under "Sftp Files". You can click on the filter to expand it to see the files.

Alternatively you can create a new Eclipse project, and the default filters will come back. This solution worked for me.

That's it! Now you understand why files don't show up in Eclipse's "Remote Systems" pane and how to fix this problem.

Questions? Let me know!
Please leave a comment here!
One Minute Information - by Michael Wen
ADVERTISING WITH US - Direct your advertising requests to Michael