I am trying to use SimpleSSHD (Dropbear) on my Android phone, which creates an SSH Server on the phone. I can connect to the phone with Putty, but I need a single-use password which Dropbear creates.
I'm trying to write a Python script to run from my Raspberry Pi to connect to my Android SSH server, but need to get around the single-use password requirement.
I've seen that I can get around that password requirement, with the use of authorized_keys
. Where I'm having trouble is what exactly is the public key, and where to put it.
On my RaspberryPi I successfully created a ~/.ssh/id_rsa.pub
file which looks like
ssh-rsa AAAABSh[huge long string of things]asdfg pi@raspberrypi
Then on the Pi, I did the following commands:
touch ~/.ssh/authorized_keys
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
But, Dropbear on Android still says no authorized keys, generating single-use password
Do I need to remove the ssh-rsa
and pi@raspberrypi
from my public key? Is that why Dropbear isn't seeing an "authorized key"?
id_rsa.pub
from that system into theauthorized_keys
file on the Androidtouch
. And more impotently theauthorized_keys
needs to be in dropbear (The accessor, can not authorise them-selves.)cat ~/.ssh/id_rsa.pub >> [directory on Dropbear]
? (Or would~/.ssh
be referring to the Dropbear config, since I'm SSH'ed in to that?)