Uploaded image for project: 'FreeNAS / TrueNAS'
  1. FreeNAS / TrueNAS
  2. NAS-101826

Do not crash replication script on misconfigured SSH connection

    XMLWordPrintable

    Details

    • Attempts to pass:
      1
    • Testing System:
      VMware Virtual Machine
    • QA Status:
      Test Passes TrueNAS
    • Acceptance Criteria:
      Hide
      When creating replication task "Scan SSH Key" button in new UI should put correct value in corresponding textbox. It should look like

      # 192.168.0.3:22 SSH-2.0-OpenSSH_7.6p1 Ubuntu-4ubuntu0.3
      192.168.0.3 ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDFzUaqvutBgPHpgGVOkalwX8rUOJ4qapaw3hAWKnJ0t4knIpZ3zRgdkhBQEspgYuFEOJqLU1iiI9F4uzIGaHhVviYK0JMqvwBt8I1jzsaEmzaESul5gEwaHiLYTYKT8GYejqDNrnci/0fc/F5svGlG4HghljF8TWzrm4Fn6FuV+8Wd/GVZc2UnDMmjpqLDEW65D9aEzt8BCfkECFN39HFqTecNCQc7hBOannNk1VwOycUwZxMt8N93x66th3IOnWL/yqLFZgNcCsuoLX2yjZpsIlCLZBQLLpxSJ05sw/kx/IKNd9GEq1tB80mk1309lPWfO8PyFbSX9cib9zCFJm7D
      # 192.168.0.3:22 SSH-2.0-OpenSSH_7.6p1 Ubuntu-4ubuntu0.3
      192.168.0.3 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBFSVNJgcL+TJroD1QPHHfZDxYDFpOQCdOQVrMnBFUnawULe07KvFmv0cYIw9sm0IsbbacSC+SKb1NKdSu5sTy7k=
      # 192.168.0.3:22 SSH-2.0-OpenSSH_7.6p1 Ubuntu-4ubuntu0.3
      192.168.0.3 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOgirhH8H+monuDsuCOEM2hRChMXX1px1WzYDrxIp4yn

      Also test the scenario in https://jira.ixsystems.com/browse/NAS-101859.
      Show
      When creating replication task "Scan SSH Key" button in new UI should put correct value in corresponding textbox. It should look like # 192.168.0.3:22 SSH-2.0-OpenSSH_7.6p1 Ubuntu-4ubuntu0.3 192.168.0.3 ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDFzUaqvutBgPHpgGVOkalwX8rUOJ4qapaw3hAWKnJ0t4knIpZ3zRgdkhBQEspgYuFEOJqLU1iiI9F4uzIGaHhVviYK0JMqvwBt8I1jzsaEmzaESul5gEwaHiLYTYKT8GYejqDNrnci/0fc/F5svGlG4HghljF8TWzrm4Fn6FuV+8Wd/GVZc2UnDMmjpqLDEW65D9aEzt8BCfkECFN39HFqTecNCQc7hBOannNk1VwOycUwZxMt8N93x66th3IOnWL/yqLFZgNcCsuoLX2yjZpsIlCLZBQLLpxSJ05sw/kx/IKNd9GEq1tB80mk1309lPWfO8PyFbSX9cib9zCFJm7D # 192.168.0.3:22 SSH-2.0-OpenSSH_7.6p1 Ubuntu-4ubuntu0.3 192.168.0.3 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBFSVNJgcL+TJroD1QPHHfZDxYDFpOQCdOQVrMnBFUnawULe07KvFmv0cYIw9sm0IsbbacSC+SKb1NKdSu5sTy7k= # 192.168.0.3:22 SSH-2.0-OpenSSH_7.6p1 Ubuntu-4ubuntu0.3 192.168.0.3 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOgirhH8H+monuDsuCOEM2hRChMXX1px1WzYDrxIp4yn Also test the scenario in https://jira.ixsystems.com/browse/NAS-101859 .

      Description

      I tried to setup a replication task for my snapshots. From the GUI perspective everything worked. I waited a few days, but no snapshot ever showed up at my remote machine.

      After manually adding debug lines in the autorepl.py script, the problem finally became apparent:

      No ECDSA host key is known for <host> and you have requested strict checking.
      Host key verification failed.

      I don't think I should need to manually add debug output to learn about this problem?

      Instead it probably should generate an alert.

      I assume the "Scan Host Key" WebGUI button (which I used earlier) should have actually fetched that key, but I guess that belongs into another issue.

       Eventually fixed it by manually connecting with ssh one time where it asked me to add the key.

        Attachments

          Container Issues

            Issue Links

              Activity

                People

                • Assignee:
                  themylogin Vladimir Vinogradenko
                  Reporter:
                  Marenz Marenz
                  QE Engineer:
                  Jeff Ervin
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  7 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Summary Panel