Porterhouse Posted June 18, 2016 Share Posted June 18, 2016 I did't find anything on my issue in the wiki or posted earlier here, so here goes my question. How can I stop rsync flagging an ECDSA key error, which seems to come back after every reboot, so is presumably related to the non-persistence of / The error I'm seeing is something like (copied from a googled thread .. but with the specifics redacted by me): The authenticity of host '[servername]:portnum ([nn.nn.nn.nn]:portnum)' can't be established. ECDSA key fingerprint is xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx. Are you sure you want to continue connecting (yes/no)? yes From what I've read elsewhere about ECDSA/SSH keys, they appear to be normally held in ~/ssh but in unRAID I gather they're in /boot/config/ssh. However, if they already exist in /boot/config/ssh, then why is rsync asking me for this info again, after every reboot. What do I need to do to make this persistent so that when I later run my script from cron, it won't fail after each reboot. Also given that after answering 'yes' to the above Q, rsync reports: Warning: Permanently added '[servername]:portnum ([nn.nn.nn.nn]:portnum' (ECDSA) to the list of known hosts. .... which clearly it isn't PERMANENTLY ADDED. I'm running my script as root, if that makes a difference. Source server is v6.1.3 and target is v6.2.0-beta21 Anyone have any advice/guidance on this config in unRAID ? Thanks Quote Link to comment
binky Posted June 19, 2016 Share Posted June 19, 2016 I wanted to have an "authorized_keys" file in my ~/.ssh/ directory on every boot, but as this directory is not persistent, there is info about adding lines into your "go" script in another thread (don't ask which as I've read quite a few!). Connect to the machine you want to be remembered and saying yes to the prompt will generate a "known_hosts" file in ~/.ssh Copy the file into /boot/config/ssh dir so that there is a permanent copy on your USB key Add the following lines to your "go" script (/boot/config/go) # umask setup umask 077 # Variable Setup CONFIG=/boot/config/ssh HOME_SSH=/root/.ssh if [ ! -d "$HOME_SSH" ]; then mkdir $HOME_SSH cp $CONFIG/known_hosts $HOME_SSH fi If you need further clarification, just ask Binky Quote Link to comment
ken-ji Posted June 19, 2016 Share Posted June 19, 2016 just like to point out that everything in /boot/config/ssh is also copied over to /etc/ssh during ssh service startup you might want to use a different folder - or a different sshd_config file to keep the authorized_keys file inside /etc/ssh Quote Link to comment
Porterhouse Posted June 19, 2016 Author Share Posted June 19, 2016 @binky: That worked perfectly thanks. ECDSA/SSH key no longer being challenged following a reboot of my SOURCE c/w target server's name/IP noted in: /boot/config/ssh/known_hosts due to this being re-created (as /root/.ssh/known_hosts) by the syntax added to: /boot/config/go @ken-ji Noted. Thanks Solved! Quote Link to comment
comet424 Posted February 26, 2019 Share Posted February 26, 2019 hi im currently having issues with this I setup my go files and I still get this error when I try to transfer files with rsync I get the cant establish Quote Link to comment
comet424 Posted February 26, 2019 Share Posted February 26, 2019 (edited) this is what I done Initial Key making (one time On Tower Main Server) --------------------------------- ssh-keygen -t rsa -b 2048 -f /root/.ssh/id_rsa cp /root/.ssh/* /boot/config/sshroot/ Main Server Go File -------------------------- #Tower Server Copy SSH #!/bin/bash # Start the Management Utility /usr/local/sbin/emhttp & mkdir -p /root/.ssh cp /boot/config/sshroot/* /root/.ssh/ chmod g-rwx,o-rwx -R /root/.ssh Then in windows I ----------------------------------- copy \\tower\flash\config\sshroot to \\mitchsserver\flash\FromTower 2nd Server Go file ------------------------------ #!/bin/bash # Start the Management Utility /usr/local/sbin/emhttp & #Mitchs Server Copy SSH mkdir -p /root/.ssh cp /boot/FromTower/sshroot/* /root/.ssh/ cat /boot/FromTower/sshroot/id_rsa.pub > /root/.ssh/authorized_keys chmod g-rwx,o-rwx -R /root/.ssh on mitchs server I type rsync -avzu -s --stats --numeric-ids --progress -e "ssh -i /root/.ssh/id_rsa -T -o Compression=no -x" root@tower:/mnt/user/Documents/ /mnt/user/Mikes\ Files/Documents/ so it does all this but still cant connect I get the cant establish Edited February 26, 2019 by comet424 1 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.