addon-ssh
addon-ssh copied to clipboard
rsync Not Working
Problem/Motivation
I would like to backup Hassio backups to my NAS (in my case openmediavault (omv)) via rsync.
On the omv I created a new pair of ssh-rsa keys and transferred it to the Advanced SSH & Web Terminal configuration.
The configuration looks accordingly
username: root
password: ""
authorized_keys:
- >-
ssh-rsa
AAAAB3...........
- >-
ssh-rsa
AAAAB3........... =omv
sftp: false
compatibility_mode: false
allow_agent_forwarding: false
allow_remote_port_forwarding: false
allow_tcp_forwarding: false
The user is set to root
as stated in Known issues and limitations
I already added another authorized_key from my YubiKey to the configuration which is on position one.
The omv ssh key is second position.
Expected behavior
The rsync job gets started on the omv manually or via CRON.
omv connects via ssh to hassio and pulls folders and files.
No password needed to login on Hassio, just ssh keys.
Actual behavior
The connection with the first ssh key (from YubiKey) works flawlessly.
The connection from omv with the second key doesn't work.
When I manually try to establish ssh connection from omv -> hassio the following error message is shown.
192.xxx.xxx.111 = hassio
On omv CLI I did the following to add the hassio identity to omv.
normaluser@omv:~ $ sudo su
root@omv:/home/user# ssh [email protected]
The authenticity of host '192.xxx.xxx.111 (192.xxx.xxx.111)' can't be established.
ED25519 key fingerprint is SHA256:xxxxyyyyzzzz.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '192.xxx.xxx.111' (ED25519) to the list of known hosts.
[email protected]: Permission denied (publickey).
root@omv:/home/user# ssh [email protected]
ssh: connect to host 192.xxx.xxx.111 port 22: Connection refused
root@omv:/home/user#
What I did to fix the problem:
- Re-created a new set of ssh-rsa keys on omv.
- Removed all keys from the Advanced SSH & Web Terminal configuration
- Restarted Hassio and its configuration.
- Copied just the public ssh-rsa key from omv in the Advanced SSH & Web Terminal configuration. There it is now the ONLY ssh key on Hassio side.
- Double checked that the user is set to
root
. - Network, set port so 22
- Tried to connect.
- Connection refused with the same error as above.
On the omv side the configuration works with other servers and services flawlessly when the public key is put in the remote servers ~/.ssh/authorized
file.
Is there a change to get rsync with ssh-rsa on Advanced SSH & Web Terminal working?
Steps to reproduce
see above
Proposed changes
(If you have a proposed change, workaround or fix, describe the rationale behind it)
Check your keys are within the supported types https://github.com/hassio-addons/addon-ssh/blob/cf6312f3e78f717effeb2c3f1ce0c2492217c03a/ssh/rootfs/etc/ssh/sshd_config#L24-L26
There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!