From: asmw Date: Mon, 20 Feb 2012 09:54:23 +0000 (+0100) Subject: Fix port usage and always try to add the generated key X-Git-Url: http://git.joshuawise.com/dumload.git/commitdiff_plain/7d9c89759bf8da6e82a57ef43e6471c5b5b794f1?ds=inline;hp=--cc Fix port usage and always try to add the generated key --- 7d9c89759bf8da6e82a57ef43e6471c5b5b794f1 diff --git a/src/com/joshuawise/dumload/Uploader.java b/src/com/joshuawise/dumload/Uploader.java index e7725e9..d81441a 100644 --- a/src/com/joshuawise/dumload/Uploader.java +++ b/src/com/joshuawise/dumload/Uploader.java @@ -284,10 +284,14 @@ public class Uploader extends Service implements Runnable, UserInfo, UIKeyboardI jsch.addIdentity(homedir + "/id_dsa"); } catch (java.lang.Exception e) { } + try { + jsch.addIdentity(homedir + "/id_dsa_generated"); + } catch (java.lang.Exception e) { + } SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); String server = prefs.getString("server", "").trim(); String userName = prefs.getString("userName", "").trim(); - Integer port = prefs.getInt("serverPort", 22); + Integer port = Integer.valueOf(prefs.getString("port", "22")); Log.d("dbg", userName + "@" + server + ":" + port); Session s = jsch.getSession(userName, server, port); s.setUserInfo(this);