Hello Guest, if you are reading this it means you have not registered yet. Please take a second, Click here to register, and in a few simple steps you will be able to enjoy our community and use our OpenViX support section.
Results 1 to 15 of 21

Thread: Engima2 enable ssh key access only

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    birdman's Avatar
    Title
    Moderator
    Join Date
    Sep 2014
    Location
    Hitchin, UK
    Posts
    7,829
    Thanks
    239
    Thanked 1,664 Times in 1,311 Posts
    Quote Originally Posted by birdman View Post
    It's running busybox, so the ssh is dropbear.
    Not quite sure why I though the former meant the latter.

    Anyway - I (think) I've worked out a way to do it.

    1. Create a .ssh directory for root.
    2. Put an authorized_keys file in . This should contain the public copy of the key you wish to authenticate with (one line starting ssh-rsa.....).
    3. Then change the /etc/default/dropbear file to contain:
      Code:
      DROPBEAR_EXTRA_ARGS="-g"


    For this to persists over any reflashes you'll need to add /etc/default/dropbear and /home/root/.ssh to the backup file list.
    MiracleBox Prem Twin HD - 2@DVB-T2 + Xtrend et8000 - 5(incl. 2 different USBs)@DVB-T2[terrestrial - UK Freeview HD, Sandy Heath] - LAN/USB-stick/HDD

  2. The Following User Says Thank You to birdman For This Useful Post:

    Alankellyeire (20-04-17)

  3. #2

    Title
    Senior Member
    Join Date
    Dec 2012
    Posts
    188
    Thanks
    126
    Thanked 37 Times in 21 Posts
    Quote Originally Posted by birdman View Post
    Not quite sure why I though the former meant the latter.

    Anyway - I (think) I've worked out a way to do it.

    1. Create a .ssh directory for root.
    2. Put an authorized_keys file in . This should contain the public copy of the key you wish to authenticate with (one line starting ssh-rsa.....).
    3. Then change the /etc/default/dropbear file to contain:
      Code:
      DROPBEAR_EXTRA_ARGS="-g"


    For this to persists over any reflashes you'll need to add /etc/default/dropbear and /home/root/.ssh to the backup file list.
    no luck bud.

    this has me baffled. on the man page it says dropbearconvert is needed to convert the private key either openssh or dropbear to the other. since mac and Ubuntu use openssh shouldn't i need to use it.

    im going to keep searching, if i find a solution or anything helpful ill post it here.

    thanks

  4. #3
    birdman's Avatar
    Title
    Moderator
    Join Date
    Sep 2014
    Location
    Hitchin, UK
    Posts
    7,829
    Thanks
    239
    Thanked 1,664 Times in 1,311 Posts
    Quote Originally Posted by Alankellyeire View Post
    this has me baffled. on the man page it says dropbearconvert is needed to convert the private key either openssh or dropbear to the other. since mac and Ubuntu use openssh shouldn't i need to use it.
    You don't need to convert any keys.

    Oh. and I forgot to add the final point above.

    Restart* dropbear, or reboot the system (which will achieve the same thing):

    *
    Code:
    /etc/init.d/dropbear restart
    Last edited by birdman; 21-04-17 at 00:20.
    MiracleBox Prem Twin HD - 2@DVB-T2 + Xtrend et8000 - 5(incl. 2 different USBs)@DVB-T2[terrestrial - UK Freeview HD, Sandy Heath] - LAN/USB-stick/HDD

  5. The Following User Says Thank You to birdman For This Useful Post:

    Alankellyeire (21-04-17)

  6. #4

    Title
    Senior Member
    Join Date
    Dec 2012
    Posts
    188
    Thanks
    126
    Thanked 37 Times in 21 Posts
    I have been restarting after every settings change but still no luck. I try again when I finish work and I'll post all the commands Im using.

    Can you connect to your box using keys generated using openssh? Like I'm trying to do?

  7. #5
    birdman's Avatar
    Title
    Moderator
    Join Date
    Sep 2014
    Location
    Hitchin, UK
    Posts
    7,829
    Thanks
    239
    Thanked 1,664 Times in 1,311 Posts
    Quote Originally Posted by Alankellyeire View Post
    Can you connect to your box using keys generated using openssh? Like I'm trying to do?
    Yes, I just copy the id_rsa.pub file from the account I want to connect to root to /home/root/.ssh/authorized_keys.

    Having done that and restarted dropbear with a "-g" option the result is:

    Account with that id_rsa.pub
    Code:
    [parent]: slogin root@et8000
    root@et8000:~#
    Account without that id_rsa.pub
    Code:
    tester@parent ~ $ slogin root@et8000
    root@et8000's password: 
    Permission denied, please try again.
    It still prompts for a password, so that you don't know why it's not letting you in.

    if I wanted to allow multiple accounts to connect I'd just catenate all of their id_rsa.pub files into the authorized_keys file.
    MiracleBox Prem Twin HD - 2@DVB-T2 + Xtrend et8000 - 5(incl. 2 different USBs)@DVB-T2[terrestrial - UK Freeview HD, Sandy Heath] - LAN/USB-stick/HDD

  8. The Following User Says Thank You to birdman For This Useful Post:

    Alankellyeire (21-04-17)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
This website uses cookies
We use cookies to store session information to facilitate remembering your login information, to allow you to save website preferences, to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners.