Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[SOLVED] Configuring SSH/ECDSA setup to support rsync between 2x v6 servers

Featured Replies

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

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

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

 

  • Author

@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!

  • 2 years later...

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

 

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 by comet424

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.