Total Pageviews

Sunday, 19 February 2012

SSH Login without password with ConnectBot on Android

typing password on Android device is troublesome, espcially when the password is long and complex. You may know that ssh-keygen can be used to generate rsa key pair to configure server, for SSH login without password (detailed in http://linuxproblem.org/art_9.html). On Android device you can do the same thing with ConnectBot.
  Open ConnectBot, Menu => “Manage Pubkeys” => Menu => “Generate”, then generate one. The password on this step is NOT the acctual server password, but the passwd for this key pair(so if you can ensure the safty of your device you dont have to fill it). After touching the screen for a while the key pair is generated, and you can manage to copy your public key to PC(e.g. via a text file in sdcard). Then append public key to ~/.ssh/authorized_keys remote sever. In fact the process of copying public key can be done on the phone, but I suppose this way is the most efficient.
  It is strongly adviced that you also backup your private key to sdcard or PC. Once you clear data storage for ConnectBot (e.g. uninstall ConnectBot or installed a now ROM), the private key is lost and you have to this once again. With the private key backuped on your sdcard, you can easily import it afterward (in the similiar way to create it).

No comments:

Post a Comment