ssh to the Yun without password prompt

You can login to the Yun without the hassle of entering the password you set for it, this is supposedly even more secure than the normal way.

All the details are at but here is the short version for Linux, Windows looks more complicated but the link above covers the details.

First check if you already have a public DSA key:

ls ~/.ssh/

If you get “No such file or directory” then do this:
ssh-keygen -t dsa press enter three times at the prompts.
Now do this:

scp ~/.ssh/ root@<yourYunsname>.local:/tmp

ssh into the Yun (using your password for the last time!) and:

cd /etc/dropbear
cat /tmp/id_*.pub >> authorized_keys
chmod 0600 authorized_keys

exit the ssh session and restart it, NO password prompt!

If someone knows how to implement this on the web interface it would be great.


I would like to add that the command:

ssh-copy-id root@arduino.local

issued from my linux box to the avahi-enabled arduino card, will do just that for you, still you have to copy the ‘authorized_keys’ file from ‘~/.ssh’ to ‘/etc/dropbear’ though.

You can use rsa encryption as well.


For the record, latest nightly IDE has SSH public key support. So, if .ssh/config is properly configured (see this), the IDE will use public key authentication and stop bothering you with password prompt

I still get the password prompt when uploading but I can just tell it to upload without entering a password and it works. I am using the current nightly build for 64 bit Linux and made the changes to the .ssh/config and /etc/config/drop bear.

Is this normal or have I messed something up?

I hope it's the latter, but, just in case, can you comment on the github issue giving some additional details?

Done, once my setup works as expected I'll post instructions here, the thread on GitHub is getting long and it can be a bit hard to pick out the correct part.