Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rsync Not Working #730

Closed
userofgithub023897 opened this issue Apr 27, 2024 · 2 comments
Closed

rsync Not Working #730

userofgithub023897 opened this issue Apr 27, 2024 · 2 comments
Labels
stale There has not been activity on this issue or PR for quite some time.

Comments

@userofgithub023897
Copy link

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 root@192.xxx.xxx.111
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.
root@192.xxx.xxx.111: Permission denied (publickey).
root@omv:/home/user# ssh root@192.xxx.xxx.111
ssh: connect to host 192.xxx.xxx.111 port 22: Connection refused
root@omv:/home/user#

What I did to fix the problem:

  1. Re-created a new set of ssh-rsa keys on omv.
  2. Removed all keys from the Advanced SSH & Web Terminal configuration
  3. Restarted Hassio and its configuration.
  4. 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.
  5. Double checked that the user is set to root.
  6. Network, set port so 22
  7. Tried to connect.
  8. 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)

@sinclairpaul
Copy link
Member

sinclairpaul commented Apr 27, 2024

Check your keys are within the supported types

Ciphers aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr
MACs -hmac-sha1,hmac-sha1-etm@openssh.com,hmac-sha2-256,hmac-sha2-512,umac-128@openssh.com,umac-64-etm@openssh.com,umac-64@openssh.com
KexAlgorithms -ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group14-sha256

Copy link

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!

@github-actions github-actions bot added the stale There has not been activity on this issue or PR for quite some time. label May 28, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale There has not been activity on this issue or PR for quite some time.
Projects
None yet
Development

No branches or pull requests

2 participants