Skip to content

SSH: login with keys

roleo edited this page Jan 5, 2020 · 2 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 /home/yi-hack/.ssh/authorized_keys
touch /home/yi-hack/.ssh/authorized_keys
  1. Copy your key form ~/.ssh/id_rsa.pub to /home/yi-hack/.ssh/authorized_keys using vi (copy and paste).

  2. Correct the file permissions:

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