Skip to content

SSH: login with keys

roleo edited this page May 31, 2022 · 3 revisions

If you want to login to a ssh session using keys and not password prompt, follow this guide:

  1. Generate a key on your client device:
ssh-keygen -b 4096
  1. Login to your camera and create the file /tmp/sd/yi-hack/.ssh/authorized_keys
touch /tmp/sd/yi-hack/.ssh/authorized_keys
  1. Copy your key form ~/.ssh/id_rsa.pub to /tmp/sd/yi-hack/.ssh/authorized_keys using vi (copy and paste).

  2. Correct the file permissions:

chmod 0600 /tmp/sd/yi-hack/.ssh/authorized_keys
  1. Restart the cam:
sync
reboot
  1. If you want to disable the password login, edit /tmp/sd/yi-hack/script/system.sh and add the option "-s" to dropbear.