View Single Post
Old 04-01-2022, 12:36 PM   #211
iandol
Enthusiast
iandol ought to be getting tired of karma fortunes by now.iandol ought to be getting tired of karma fortunes by now.iandol ought to be getting tired of karma fortunes by now.iandol ought to be getting tired of karma fortunes by now.iandol ought to be getting tired of karma fortunes by now.iandol ought to be getting tired of karma fortunes by now.iandol ought to be getting tired of karma fortunes by now.iandol ought to be getting tired of karma fortunes by now.iandol ought to be getting tired of karma fortunes by now.iandol ought to be getting tired of karma fortunes by now.iandol ought to be getting tired of karma fortunes by now.
 
iandol's Avatar
 
Posts: 40
Karma: 216612
Join Date: Feb 2022
Device: Kobo Nia
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
iandol is offline   Reply With Quote