Configuring QuickSSHD for pub/privkey

A little while ago I discovered QuickSSHD, an sshd for Android that comes as an App. The main benefit it is comes as an App and does not require root. QuickSSHD is based on Dropbear (I wrote about it a while ago) and I plan to use it for backing up my Mobile. But first things first: the first step in setting up an sshd is to avoid using password-logon and use pub/priv keys instead. We will go through the step of setting this up. For forther reference and a deeper understanding you may want to read more about this here.

1. Create a dsa-key-pair on your linux client

  ssh-keygen -t dsa -f id_dsa-android

Note: I named the key id_dsa-android because that's my own convention

2. Copy the public key to your Android device

  scp -P 2222 id_dsa-android.pub <your-ip-goes-here>:/sdcard

Note: This assumes you have password enabled and sshd running on port 2222

3. Validate the public key

  cat /sdcard/id_dsa-android.pub >>
  /data/data/com.teslacoilsw.quicksshd/home/.ssh/authorized_keys

Note: Validating means in this case to copy the pubkey to authorized_keys (it's located in /data/data/com.teslacoilsw.quicksshd/home/.ssh)

4. Configure Go to your QuickSSHD settings and remove the checkbox Password and check Shared Keys (If you did right the key added to authorized_keys should be listed right under the checkbox.

5. Test

  ssh -i <your-home-goes-here>/.ssh/id_dsa-android -p 2222 <your-ip-goes-here>

If everything went fine you should get:

  Enter passphrase for key '/home/sven/.ssh/id_dsa-android'

6. Troubleshooting If something does not go as expected you should consider:

  • The key was not added properly (and does not show in the settings)
  • You forgot to activate pub/privkey at a first place
  • You don't use the right key

A good way of finding out what went wrong and learn more about ssh:

  ssh -vvv -i <your-home-goes-here>/.ssh/id_dsa-android -p 2222 <your-ip-goes-here>

Discussion

Christophe, 2011/01/17 22:27
Works perfectly! Thanks.
Pierre , 2011/07/18 21:19
I agree, this tutorial is very good. It should be included in
the QuickSSH documentation, if such a thing existed.
I just add that you can avoid even typing the passphrase by
using ssh-agent
HOOVER18Karina, 2011/07/06 20:56
Following my own monitoring, millions of people all over the world receive the <a href="http://bestfinance-blog.com/topics/credit-loans">credit loans</a> from various creditors. Hence, there's good chances to get a secured loan in any country.
Ribeiro, 2012/03/12 23:35
Your's is the intelligent apporach to this issue.
Enter your comment
 
  • Bookmark at
  • Bookmark "Configuring QuickSSHD for pub/privkey" at del.icio.us
  • Bookmark "Configuring QuickSSHD for pub/privkey" at Digg
  • Bookmark "Configuring QuickSSHD for pub/privkey" at blogmarks
  • Bookmark "Configuring QuickSSHD for pub/privkey" at Google
  • Bookmark "Configuring QuickSSHD for pub/privkey" at Rojo
  • Bookmark "Configuring QuickSSHD for pub/privkey" at Simpy
  • Bookmark "Configuring QuickSSHD for pub/privkey" at Spurl
  • Bookmark "Configuring QuickSSHD for pub/privkey" at StumbleUpon
  • Bookmark "Configuring QuickSSHD for pub/privkey" at Tailrank
  • Bookmark "Configuring QuickSSHD for pub/privkey" at Technorati
  • Bookmark "Configuring QuickSSHD for pub/privkey" at Live Bookmarks
  • Bookmark "Configuring QuickSSHD for pub/privkey" at Memori
  • Bookmark "Configuring QuickSSHD for pub/privkey" at Favorites
  • Bookmark "Configuring QuickSSHD for pub/privkey" at Facebook
  • Bookmark "Configuring QuickSSHD for pub/privkey" at Twitter
  • Bookmark "Configuring QuickSSHD for pub/privkey" at Mister Wong
blog/configuring-quicksshd-for-pub/privkey.txt · Last modified: 2011/01/17 22:02 by sven
Recent changes RSS feed