EdgeRouter

Add an SSH Key to Ubiquiti EdgeRouter

I had a bit of trouble adding an ssh key to my Ubiquiti EdgeRouter 6P. I kept getting

Not a valid key file format (see man sshd) at /opt/vyatta/sbin/vyatta-load-user-key.pl line 96, <$in> line 1.

Turned out that the key needs to:

  • have a comment
  • not have any spaces in the comment
  • be on a line of it’s own in the imported file (e.g. do not add a newline at the end)

for loadkey to accept it.