Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#859 ssh access with rsa key

v0.7x
open
nobody
5
2012-10-28
2011-03-28
fabio frittoli
No

In order to access the Freenas via ssh without digiting the password, I copied a rsa public key in /root/.ssh/ of the Freenas. The private rsa key is in /root/.ssh of the server from I have to copy the data into the freenas. I made a Rsync script (to copy the data directories) and put in the cron-daily directory of the server. The script works greatly, but the BUG is that the Freenas cancel the rsa key in the /root/.ssh/
What happens? What do I have to do to avoid this problem? Thank you

Discussion

  • venult
    venult
    2011-03-28

    well, since i have embedded version (as you may have), i have this script running every startup of system, and it works.
    just put put your root key file in a place where it doesn't get deleted at boot (ie. /mnt/zpool)

    script:

    !/bin/sh

    mkdir /root/.ssh
    cat /mnt/path to key/id_dsa.pub > /root/.ssh/authorized_keys
    chown -R root /root/.ssh
    chmod -R 700 /root/.ssh