ssh w/o password

bbehler
bbehler Posts: 4  Freshman Member
First Comment

Hello,
I'd like to establish a ssh-connection to my nas326 without entering the password using Public Key Authentication.
AFAIK I'd have to enable enable "RSAAuthentication yes" and "PubkeyAuthentication yes" in the /etc/ssh/sshd_config (right?).
But after a reboot the default config is back, so what ca I do to maintain my modified config?
Thanks in advance
Björn

Best Answers

  • Mijzelf
    Mijzelf Posts: 2,807  Guru Member
    250 Answers 2500 Comments Friend Collector Seventh Anniversary
    Answer ✓

    You only need to change that keys if they are currently 'no'. If not specified, they default to 'yes'. I vaguely remember that you only need to setup the right stuff in ~/.ssh/. But meanwhile it might become a problem to get the client to use the private key, as the algorithms on the NAS are outdated.

    Further this only works for admin. The home directory for root is on a ramdisk, so it won't keep ~/.ssh/ over a reboot.

  • bbehler
    bbehler Posts: 4  Freshman Member
    First Comment
    edited January 7 Answer ✓

    Okay, thanks a lot that could explain why it doesn't work. I'll find a work-around.

    Thanks again

    Björn

All Replies

  • suisei
    suisei Posts: 114  Ally Member
    First Comment First Answer Friend Collector First Anniversary

    It seems that after a reboot, the configuration may be overwritten by a daemon or script. Perhaps you could create a script in a file that is not deleted, and schedule it to run periodically to ensure the configuration is applied on the device?

  • bbehler
    bbehler Posts: 4  Freshman Member
    First Comment

    Hello suisei,
    thanks for your reply. I like the idea but the problem is, that I'd need to restart the sshd as well to ensure that the current config is loaded.
    Restarting sshd does not work on the NAS326 (afaik).

  • suisei
    suisei Posts: 114  Ally Member
    First Comment First Answer Friend Collector First Anniversary

    When you log into the NAS, you have root access, which essentially gives you full control over the system. However, as far as I know, some basic command/services might be removed from the NAS. You could try downloading additional packages that might help you restart the services.

  • Mijzelf
    Mijzelf Posts: 2,807  Guru Member
    250 Answers 2500 Comments Friend Collector Seventh Anniversary
    Answer ✓

    You only need to change that keys if they are currently 'no'. If not specified, they default to 'yes'. I vaguely remember that you only need to setup the right stuff in ~/.ssh/. But meanwhile it might become a problem to get the client to use the private key, as the algorithms on the NAS are outdated.

    Further this only works for admin. The home directory for root is on a ramdisk, so it won't keep ~/.ssh/ over a reboot.

  • bbehler
    bbehler Posts: 4  Freshman Member
    First Comment
    edited January 7 Answer ✓

    Okay, thanks a lot that could explain why it doesn't work. I'll find a work-around.

    Thanks again

    Björn

Consumer Product Help Center