Recalbox Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • recalbox.com
    • Gitlab repository
    • Documentation
    • Discord

    Ssh keypair instead of passphrase

    Recalbox General
    ssh publickey keypair
    2
    4
    1970
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • betlog-betlog
      betlog-betlog last edited by

      I would like to access root@recalbox via ssh keypair instead of a passphrase But: /root/ is apparently read only ~ ( /recalbox/share/system/ ) contains a ~/ssh/ directory (I was expecting it to be the more traditionally named: ~/.ssh/) but doing:

      scp /home/user/.ssh/id_rsa.pub root@recalbox:/recalbox/share/system/

      cat ~/id_rsa.pub >> ~/.ssh/authorized_keys

      or even (into ~/ssh instead of ~/.ssh)

      cat ~/id_rsa.pub >> ~/ssh/authorized_keys

      does not allow me to log in without entering the passphrase. The linux used by recalbox is increasingly unusual to me. Can someone please explain how to enable passwordless keypair SSH logins?

      1 Reply Last reply Reply Quote 0
      • Substring
        Substring last edited by

        Which recalbox version do you have ? /root is not used anyomore on recalbox 4.0.0. Instead, root's home moved to /recalbox/share/system. This is where you should setup your keys, and it works perfectly i personnaly love using ssh-copy-id for such matters

        Former dev - Please reply with @substring so that i am notified when you answer me
        Ex dev - Merci de me répondre en utilisant @substring pour que je sois notifé

        1 Reply Last reply Reply Quote 0
        • betlog-betlog
          betlog-betlog last edited by

          The unstable, auto-updated, most recent version. Naturally 🙂 I did try adding them to //recalbox/share/system. But evidently I'm too familiar with debian and not with .... what IS recalbox's distro called? Would you mind throwing some relevant command lines at me please? The way recalbox's flavor of linux works in not familiar to me at all.

          1 Reply Last reply Reply Quote 0
          • betlog-betlog
            betlog-betlog last edited by

            For example, I think I know what I'm doing, yet sti still requires a password after I get what looks like a positive insertion of an authorized_key... user@betlognuc:~$ ssh-copy-id -i ~/.ssh/id_rsa.pub root@recalbox /usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed /usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys root@recalbox's password: Number of key(s) added: 1 Now try logging into the machine, with:   "ssh 'root@recalbox'" and check to make sure that only the key(s) you wanted were added. user@betlognuc:~$ ssh root@recalbox root@recalbox's password: # cd .ssh # ls -al total 12 drwx------    2 root     root          4096 Jul 13 06:07 . drwxr-xr-x   15 avahi    avahi         4096 Jul 13 06:07 .. -rw-------    1 root     root          2809 Jul 13 06:07 authorized_keys # cat authorized_keys ssh-rsa **** yep, it's there*** buuuut.... # shutdown -r now Broadcast message from root@RECALBOX (pts/0) (Wed Jul 13 06:09:31 2016): The system is going down for reboot NOW! # Write failed: Broken pipe user@betlognuc:~$ user@betlognuc:~$ ssh root@pilan root@pilan's password: ...it still asks for the password... and the whole idea of adding the pubkey is so it doesn't. What am I missing here?

            1 Reply Last reply Reply Quote 0
            • First post
              Last post

            Want to support us ?

            143
            Online

            89.8k
            Users

            26.1k
            Topics

            181.0k
            Posts

            Copyright © 2021 recalbox.com