1

Well I hope you can help me with this question. Is there a easy to use a library for android so I can read and write to my server via ssh? A perfect way would be if I only had to import a library and then could use a normal ssh connection.

The background is that I want to save a small xml file on my server and read it anytime again with my app. If there is an easier way feel free to suggest.

Thanks for any help.

Demian

1 Answers1

2

Use this lib sshj and make a connection between you app and your server, then use wget to download your xml file to the sdcard, then read it in your app through java.

Morad Edwar
  • 1,030
  • 2
  • 11
  • 27
  • Thanks it seems like it could solve my problem... But it also seems like I am not skilled enough to use it. Could you give me a simple example how I connect to a server simply using the address and the password? – alltooconfusingthereforesleep Sep 18 '13 at 09:31
  • check this [question](http://stackoverflow.com/questions/14323661/simple-ssh-connect-with-jsch) and don't forget to do everything in [AsyncTask](http://developer.android.com/reference/android/os/AsyncTask.html) not in the main thread, also make sure that you toke care of the needed permissions to access the Internet and write to the sdcard. you can know more about wget tool [here](http://www.editcorp.com/Personal/Lars_Appel/wget/v1/wget_7.html) – Morad Edwar Sep 18 '13 at 10:16