With the first option (Validate Remote Directory) the middlewared.log reports:
[2025/12/02 06:06:51] (INFO) asyncssh.log():92 - Opening SSH connection to u513491.your-storagebox.de, port 23
[2025/12/02 06:06:51] (INFO) asyncssh.log():92 - [conn=7] Connected to SSH server at u513491.your-storagebox.de, port 23
[2025/12/02 06:06:51] (INFO) asyncssh.log():92 - [conn=7] Local address: 192.168.3.4, port 54970
[2025/12/02 06:06:51] (INFO) asyncssh.log():92 - [conn=7] Peer address: 167.235.97.35, port 23
[2025/12/02 06:06:51] (DEBUG) asyncssh.log():92 - [conn=7] Sending version SSH-2.0-AsyncSSH_2.10.1
[2025/12/02 06:06:51] (DEBUG) asyncssh.log():92 - [conn=7] Received version SSH-2.0-OpenSSH_9.6p1 Ubuntu-3ubuntu13.14
[2025/12/02 06:06:51] (DEBUG) asyncssh.log():92 - [conn=7] Requesting key exchange
[2025/12/02 06:06:51] (DEBUG) asyncssh.log():92 - [conn=7] Received key exchange request
[2025/12/02 06:06:51] (DEBUG) asyncssh.log():92 - [conn=7] Beginning key exchange
[2025/12/02 06:06:51] (DEBUG) asyncssh.log():92 - [conn=7] Completed key exchange
[2025/12/02 06:06:51] (INFO) asyncssh.log():92 - [conn=7] Beginning auth for user u513491
[2025/12/02 06:06:51] (DEBUG) asyncssh.log():92 - [conn=7] Trying public key auth with rsa-sha2-256 key
[2025/12/02 06:06:52] (DEBUG) asyncssh.log():92 - [conn=7] Signing request with rsa-sha2-256 key
[2025/12/02 06:06:52] (INFO) asyncssh.log():92 - [conn=7] Auth for user u513491 succeeded
[2025/12/02 06:06:52] (DEBUG) asyncssh.log():92 - [conn=7, chan=0] Set write buffer limits: low-water=16384, high-water=65536
[2025/12/02 06:06:52] (INFO) asyncssh.log():92 - [conn=7, chan=0] Requesting new SSH session
[2025/12/02 06:06:52] (DEBUG) asyncssh.log():92 - [conn=7] Received unknown global request: hostkeys-00@openssh.com
[2025/12/02 06:06:52] (DEBUG) asyncssh.log():92 - [conn=7] Received debug message: /backup/account_chroots/u513491/home/.ssh/authorized_keys:1: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding
[2025/12/02 06:06:52] (DEBUG) asyncssh.log():92 - [conn=7] Received debug message: /backup/account_chroots/u513491/home/.ssh/authorized_keys:1: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding
[2025/12/02 06:06:52] (INFO) asyncssh.log():92 - [conn=7, chan=0] Command: test -d backup2/
[2025/12/02 06:06:52] (INFO) asyncssh.log():92 - [conn=7, chan=0] Received exit status 8
[2025/12/02 06:06:52] (INFO) asyncssh.log():92 - [conn=7, chan=0] Received channel close
[2025/12/02 06:06:52] (INFO) asyncssh.log():92 - [conn=7, chan=0] Channel closed
[2025/12/02 06:06:52] (INFO) asyncssh.log():92 - [conn=7] Closing connection
[2025/12/02 06:06:52] (INFO) asyncssh.log():92 - [conn=7] Sending disconnect: Disconnected by application (11)
[2025/12/02 06:06:52] (INFO) asyncssh.log():92 - [conn=7] Connection closed
When I uncheck the option I get the following log:
[2025/12/02 06:06:51] (INFO) asyncssh.log():92 - Opening SSH connection to u513491.your-storagebox.de, port 23
[2025/12/02 06:06:51] (INFO) asyncssh.log():92 - [conn=7] Connected to SSH server at u513491.your-storagebox.de, port 23
[2025/12/02 06:06:51] (INFO) asyncssh.log():92 - [conn=7] Local address: 192.168.3.4, port 54970
[2025/12/02 06:06:51] (INFO) asyncssh.log():92 - [conn=7] Peer address: 167.235.97.35, port 23
[2025/12/02 06:06:51] (DEBUG) asyncssh.log():92 - [conn=7] Sending version SSH-2.0-AsyncSSH_2.10.1
[2025/12/02 06:06:51] (DEBUG) asyncssh.log():92 - [conn=7] Received version SSH-2.0-OpenSSH_9.6p1 Ubuntu-3ubuntu13.14
[2025/12/02 06:06:51] (DEBUG) asyncssh.log():92 - [conn=7] Requesting key exchange
[2025/12/02 06:06:51] (DEBUG) asyncssh.log():92 - [conn=7] Received key exchange request
[2025/12/02 06:06:51] (DEBUG) asyncssh.log():92 - [conn=7] Beginning key exchange
[2025/12/02 06:06:51] (DEBUG) asyncssh.log():92 - [conn=7] Completed key exchange
[2025/12/02 06:06:51] (INFO) asyncssh.log():92 - [conn=7] Beginning auth for user u513491
[2025/12/02 06:06:51] (DEBUG) asyncssh.log():92 - [conn=7] Trying public key auth with rsa-sha2-256 key
[2025/12/02 06:06:52] (DEBUG) asyncssh.log():92 - [conn=7] Signing request with rsa-sha2-256 key
[2025/12/02 06:06:52] (INFO) asyncssh.log():92 - [conn=7] Auth for user u513491 succeeded
[2025/12/02 06:06:52] (DEBUG) asyncssh.log():92 - [conn=7, chan=0] Set write buffer limits: low-water=16384, high-water=65536
[2025/12/02 06:06:52] (INFO) asyncssh.log():92 - [conn=7, chan=0] Requesting new SSH session
[2025/12/02 06:06:52] (DEBUG) asyncssh.log():92 - [conn=7] Received unknown global request: hostkeys-00@openssh.com
[2025/12/02 06:06:52] (DEBUG) asyncssh.log():92 - [conn=7] Received debug message: /backup/account_chroots/u513491/home/.ssh/authorized_keys:1: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding
[2025/12/02 06:06:52] (DEBUG) asyncssh.log():92 - [conn=7] Received debug message: /backup/account_chroots/u513491/home/.ssh/authorized_keys:1: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding
[2025/12/02 06:06:52] (INFO) asyncssh.log():92 - [conn=7, chan=0] Command: test -d backup2/
[2025/12/02 06:06:52] (INFO) asyncssh.log():92 - [conn=7, chan=0] Received exit status 8
[2025/12/02 06:06:52] (INFO) asyncssh.log():92 - [conn=7, chan=0] Received channel close
[2025/12/02 06:06:52] (INFO) asyncssh.log():92 - [conn=7, chan=0] Channel closed
[2025/12/02 06:06:52] (INFO) asyncssh.log():92 - [conn=7] Closing connection
[2025/12/02 06:06:52] (INFO) asyncssh.log():92 - [conn=7] Sending disconnect: Disconnected by application (11)
[2025/12/02 06:06:52] (INFO) asyncssh.log():92 - [conn=7] Connection closed
Ohne validate:
[2025/12/02 06:08:37] (WARNING) middlewared.process_method_call():394 - Exception while calling rsynctask.create(*[{'path': '/mnt/nvme/storage', 'user': 'truenas_admin', 'mode': 'SSH', 'remotehost': None, 'remoteport': None, 'ssh_credentials': 4, 'remotepath': 'backup', 'direction': 'PUSH', 'desc': 'Test', 'schedule': {'minute': '0', 'hour': '0', 'dom': '*', 'month': '*', 'dow': '*'}, 'recursive': True, 'times': True, 'compress': True, 'archive': False, 'delete': False, 'quiet': False, 'preserveperm': False, 'preserveattr': False, 'delayupdates': True, 'extra': [], 'enabled': True, 'validate_rpath': False}]) @cee:{"TNLOG": {"exception": "Traceback (most recent call last):\n File \"/usr/lib/python3/dist-packages/middlewared/api/base/server/ws_handler/rpc.py\", line 360, in process_method_call\n result = await method.call(app, id_, params)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/usr/lib/python3/dist-packages/middlewared/api/base/server/method.py\", line 57, in call\n result = await self.middleware.call_with_audit(self.name, self.serviceobj, methodobj, params, app,\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/usr/lib/python3/dist-packages/middlewared/main.py\", line 954, in call_with_audit\n result = await self._call(method, serviceobj, methodobj, params, app=app,\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/usr/lib/python3/dist-packages/middlewared/main.py\", line 771, in _call\n return await methodobj(*prepared_call.args)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/usr/lib/python3/dist-packages/middlewared/service/crud_service.py\", line 176, in create\n return await self.middleware._call(\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/usr/lib/python3/dist-packages/middlewared/main.py\", line 771, in _call\n return await methodobj(*prepared_call.args)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/usr/lib/python3/dist-packages/middlewared/service/crud_service.py\", line 214, in nf\n rv = await func(*args, **kwargs)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/usr/lib/python3/dist-packages/middlewared/api/base/decorator.py\", line 108, in wrapped\n result = await func(*args)\n ^^^^^^^^^^^^^^^^^\n File \"/usr/lib/python3/dist-packages/middlewared/plugins/rsync.py\", line 370, in do_create\n verrors, data = await self.validate_rsync_task(data, 'rsync_task_create')\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/usr/lib/python3/dist-packages/middlewared/plugins/rsync.py\", line 353, in validate_rsync_task\n if not known_hosts.match(connect_kwargs['host'], '', None)[0]:\n ^^^^^^^^^^^\nUnboundLocalError: cannot access local variable 'known_hosts' where it is not associated with a value", "type": "PYTHON_EXCEPTION", "time": "2025-12-02 05:08:37.571845"}}