views:

61

answers:

3

Hi all,

Im working on a program to access files from remote hosts. Basically what i want to do is logging in remote Windows/Linux host with valid credentials, check what files exist in a specific folder, read those files. Is there a library I can use to fulfill the above purpose in Linux?

Thanks.

Additional info: I'm using C. The remote hosts are not expected to have any non-default service (say ftp) running on them. So as long as the protocol can support most default-config-hosts, it should be fine.

Thanks again.

+2  A: 

It looks like you need an api like libssh ...

The ssh library was designed to be used by programmers needing a working SSH implementation by the mean of a library. The complete control of the client is made by the programmer. With libssh, you can remotely execute programs, transfer files, use a secure and transparent tunnel for your remote programs.

wj
A: 

gio can handle any protocol that has a plugin, but you'll need to use glib in order to take advantage of it.

Ignacio Vazquez-Abrams
A: 

To really simplify your programming task, use a fuse module to map the remote system to a local filesystem and just access it with filesystem semantics. ;) http://fuse.sourceforge.net/sshfs.html

Steve Madere