View Single Post
Old 02-13-2023, 03:09 PM   #215
Aaron2222
Junior Member
Aaron2222 began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Feb 2023
Device: Kobo Sage
Quote:
Originally Posted by iandol View Post
OK, here were the steps I needed to get key-only ssh access to work:
  1. on my computer generate a simple key-pair:
    Code:
    ssh-keygen -f ~/.ssh/kobo
    the default settings work for dropbear ok...
  2. The contents of the public key must be copied into a single line of the file:
    Code:
    /usr/local/niluje/usbnet/etc/authorized_keys
    ... this didn't exist so I had to make (touch) the file first then edit it, I used nano to copy and paste from the output of
    Code:
    cat ~/.ssh/kobo.pub
    from my computer. This file should contain your public key contents on a single line.
  3. Then I needed to edit:
    Code:
    nano /usr/local/stuff/bin/stuff-daemons.sh
    and uncomment the line
    Code:
     SSHD_OPTS="${SSHD_OPTS} -s"
    and I also commented out line
    Code:
    #SSHD_OPTS="${SSHD_OPTS} -n"
  4. I didn't need telnet, and to disable it you have to make a file in a folder:
    Code:
    touch /usr/local/niluje/usbnet/etc/NO_TELNET
  5. Reboot the device.
  6. To use this key:
    Code:
    ssh -i ~/.ssh/kobo root@my.ip.add
I also ended up doing the same. Though given /usr/local/stuff/bin/stuff-daemons.sh has been modified, would those changes get overridden on an update with update-kobostuff?
Aaron2222 is offline   Reply With Quote