Linux Guys - Why isn't this working? .SSH Auth keys for Pi

OK, so let’s regroup here…

First, on the Pi, you need to remove everything from the Vera that you’ve put into authorized_keys so far. You copied binary data into it. Just delete it if there’s nothing else in there you may have needed (no other systems’ keys that connect to that system), otherwise, you’ll need to edit.

Then, on the Vera:

  1. Run this to copy the (Vera) system public key to the Pi:
    dropbearkey -y -f /etc/dropbear/dropbear_rsa_host_key | grep -F ssh-rsa | ssh pi@192.168.1.101 'mkdir -p ~/.ssh ; cat >>~/.ssh/authorized_keys'
    
    

Then, over on the Pi:

  1. chown -R pi:pi ~pi/.ssh/
  2. chmod 640 ~pi/.ssh/authorized_keys
  3. chmod 700 ~pi/.ssh

Then, back on the Vera, you should be able to: ssh pi@192.168.1.101 'ls -l' (or whatever command) without password.