Kevin Wolf | 56ea745 | 2018-02-08 20:06:41 +0100 | [diff] [blame] | 1 | === Successful image creation (defaults) === |
| 2 | |
Max Reitz | 8a57a4b | 2019-02-10 15:57:36 +0100 | [diff] [blame] | 3 | {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "ssh", "location": {"path": "TEST_DIR/PID-t.img", "server": {"host": "127.0.0.1", "port": "22"}}, "size": 4194304}}} |
Max Reitz | e21b5f3 | 2018-10-22 14:53:07 +0100 | [diff] [blame] | 4 | {"return": {}} |
| 5 | {"execute": "job-dismiss", "arguments": {"id": "job0"}} |
| 6 | {"return": {}} |
Kevin Wolf | 56ea745 | 2018-02-08 20:06:41 +0100 | [diff] [blame] | 7 | |
Max Reitz | b8c1f90 | 2019-02-25 20:08:27 +0100 | [diff] [blame] | 8 | image: TEST_IMG |
Kevin Wolf | 56ea745 | 2018-02-08 20:06:41 +0100 | [diff] [blame] | 9 | file format: IMGFMT |
Eric Blake | de38b50 | 2019-04-17 12:11:01 -0500 | [diff] [blame] | 10 | virtual size: 4 MiB (4194304 bytes) |
Kevin Wolf | 56ea745 | 2018-02-08 20:06:41 +0100 | [diff] [blame] | 11 | |
Kevin Wolf | 00af193 | 2018-05-23 18:19:00 +0200 | [diff] [blame] | 12 | |
| 13 | image: TEST_IMG |
Kevin Wolf | 56ea745 | 2018-02-08 20:06:41 +0100 | [diff] [blame] | 14 | file format: IMGFMT |
Eric Blake | de38b50 | 2019-04-17 12:11:01 -0500 | [diff] [blame] | 15 | virtual size: 4 MiB (4194304 bytes) |
Kevin Wolf | 56ea745 | 2018-02-08 20:06:41 +0100 | [diff] [blame] | 16 | |
| 17 | === Test host-key-check options === |
| 18 | |
Daniel P. Berrangé | bf78326 | 2021-06-22 12:51:56 +0100 | [diff] [blame] | 19 | --- no host key checking -- |
| 20 | |
Max Reitz | 8a57a4b | 2019-02-10 15:57:36 +0100 | [diff] [blame] | 21 | {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "ssh", "location": {"host-key-check": {"mode": "none"}, "path": "TEST_DIR/PID-t.img", "server": {"host": "127.0.0.1", "port": "22"}}, "size": 8388608}}} |
Max Reitz | e21b5f3 | 2018-10-22 14:53:07 +0100 | [diff] [blame] | 22 | {"return": {}} |
| 23 | {"execute": "job-dismiss", "arguments": {"id": "job0"}} |
| 24 | {"return": {}} |
Kevin Wolf | 56ea745 | 2018-02-08 20:06:41 +0100 | [diff] [blame] | 25 | |
Max Reitz | b8c1f90 | 2019-02-25 20:08:27 +0100 | [diff] [blame] | 26 | image: TEST_IMG |
Kevin Wolf | 56ea745 | 2018-02-08 20:06:41 +0100 | [diff] [blame] | 27 | file format: IMGFMT |
Eric Blake | de38b50 | 2019-04-17 12:11:01 -0500 | [diff] [blame] | 28 | virtual size: 8 MiB (8388608 bytes) |
Kevin Wolf | 56ea745 | 2018-02-08 20:06:41 +0100 | [diff] [blame] | 29 | |
Daniel P. Berrangé | bf78326 | 2021-06-22 12:51:56 +0100 | [diff] [blame] | 30 | --- known_hosts key checking -- |
| 31 | |
Max Reitz | 8a57a4b | 2019-02-10 15:57:36 +0100 | [diff] [blame] | 32 | {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "ssh", "location": {"host-key-check": {"mode": "known_hosts"}, "path": "TEST_DIR/PID-t.img", "server": {"host": "127.0.0.1", "port": "22"}}, "size": 4194304}}} |
Max Reitz | e21b5f3 | 2018-10-22 14:53:07 +0100 | [diff] [blame] | 33 | {"return": {}} |
| 34 | {"execute": "job-dismiss", "arguments": {"id": "job0"}} |
| 35 | {"return": {}} |
Kevin Wolf | 00af193 | 2018-05-23 18:19:00 +0200 | [diff] [blame] | 36 | |
Max Reitz | b8c1f90 | 2019-02-25 20:08:27 +0100 | [diff] [blame] | 37 | image: TEST_IMG |
Kevin Wolf | 56ea745 | 2018-02-08 20:06:41 +0100 | [diff] [blame] | 38 | file format: IMGFMT |
Eric Blake | de38b50 | 2019-04-17 12:11:01 -0500 | [diff] [blame] | 39 | virtual size: 4 MiB (4194304 bytes) |
Kevin Wolf | 56ea745 | 2018-02-08 20:06:41 +0100 | [diff] [blame] | 40 | |
Daniel P. Berrangé | bf78326 | 2021-06-22 12:51:56 +0100 | [diff] [blame] | 41 | --- explicit md5 key checking -- |
| 42 | |
Max Reitz | 8a57a4b | 2019-02-10 15:57:36 +0100 | [diff] [blame] | 43 | {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "ssh", "location": {"host-key-check": {"hash": "wrong", "mode": "hash", "type": "md5"}, "path": "TEST_DIR/PID-t.img", "server": {"host": "127.0.0.1", "port": "22"}}, "size": 2097152}}} |
Max Reitz | e21b5f3 | 2018-10-22 14:53:07 +0100 | [diff] [blame] | 44 | {"return": {}} |
Hanna Reitz | 48f1fcd | 2022-03-18 13:53:04 +0100 | [diff] [blame] | 45 | Job failed: remote host key fingerprint 'md5:HASH' does not match host_key_check 'md5:wrong' |
Max Reitz | e21b5f3 | 2018-10-22 14:53:07 +0100 | [diff] [blame] | 46 | {"execute": "job-dismiss", "arguments": {"id": "job0"}} |
| 47 | {"return": {}} |
Kevin Wolf | 00af193 | 2018-05-23 18:19:00 +0200 | [diff] [blame] | 48 | |
Max Reitz | 8a57a4b | 2019-02-10 15:57:36 +0100 | [diff] [blame] | 49 | {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "ssh", "location": {"host-key-check": {"hash": "HASH", "mode": "hash", "type": "md5"}, "path": "TEST_DIR/PID-t.img", "server": {"host": "127.0.0.1", "port": "22"}}, "size": 8388608}}} |
Max Reitz | e21b5f3 | 2018-10-22 14:53:07 +0100 | [diff] [blame] | 50 | {"return": {}} |
| 51 | {"execute": "job-dismiss", "arguments": {"id": "job0"}} |
| 52 | {"return": {}} |
Kevin Wolf | 00af193 | 2018-05-23 18:19:00 +0200 | [diff] [blame] | 53 | |
Max Reitz | b8c1f90 | 2019-02-25 20:08:27 +0100 | [diff] [blame] | 54 | image: TEST_IMG |
Kevin Wolf | 56ea745 | 2018-02-08 20:06:41 +0100 | [diff] [blame] | 55 | file format: IMGFMT |
Eric Blake | de38b50 | 2019-04-17 12:11:01 -0500 | [diff] [blame] | 56 | virtual size: 8 MiB (8388608 bytes) |
Kevin Wolf | 56ea745 | 2018-02-08 20:06:41 +0100 | [diff] [blame] | 57 | |
Daniel P. Berrangé | bf78326 | 2021-06-22 12:51:56 +0100 | [diff] [blame] | 58 | --- explicit sha1 key checking -- |
| 59 | |
Max Reitz | 8a57a4b | 2019-02-10 15:57:36 +0100 | [diff] [blame] | 60 | {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "ssh", "location": {"host-key-check": {"hash": "wrong", "mode": "hash", "type": "sha1"}, "path": "TEST_DIR/PID-t.img", "server": {"host": "127.0.0.1", "port": "22"}}, "size": 2097152}}} |
Max Reitz | e21b5f3 | 2018-10-22 14:53:07 +0100 | [diff] [blame] | 61 | {"return": {}} |
Hanna Reitz | 48f1fcd | 2022-03-18 13:53:04 +0100 | [diff] [blame] | 62 | Job failed: remote host key fingerprint 'sha1:HASH' does not match host_key_check 'sha1:wrong' |
Max Reitz | e21b5f3 | 2018-10-22 14:53:07 +0100 | [diff] [blame] | 63 | {"execute": "job-dismiss", "arguments": {"id": "job0"}} |
| 64 | {"return": {}} |
Kevin Wolf | 00af193 | 2018-05-23 18:19:00 +0200 | [diff] [blame] | 65 | |
Max Reitz | 8a57a4b | 2019-02-10 15:57:36 +0100 | [diff] [blame] | 66 | {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "ssh", "location": {"host-key-check": {"hash": "HASH", "mode": "hash", "type": "sha1"}, "path": "TEST_DIR/PID-t.img", "server": {"host": "127.0.0.1", "port": "22"}}, "size": 4194304}}} |
Max Reitz | e21b5f3 | 2018-10-22 14:53:07 +0100 | [diff] [blame] | 67 | {"return": {}} |
| 68 | {"execute": "job-dismiss", "arguments": {"id": "job0"}} |
| 69 | {"return": {}} |
Kevin Wolf | 00af193 | 2018-05-23 18:19:00 +0200 | [diff] [blame] | 70 | |
Max Reitz | b8c1f90 | 2019-02-25 20:08:27 +0100 | [diff] [blame] | 71 | image: TEST_IMG |
Kevin Wolf | 56ea745 | 2018-02-08 20:06:41 +0100 | [diff] [blame] | 72 | file format: IMGFMT |
Eric Blake | de38b50 | 2019-04-17 12:11:01 -0500 | [diff] [blame] | 73 | virtual size: 4 MiB (4194304 bytes) |
Kevin Wolf | 56ea745 | 2018-02-08 20:06:41 +0100 | [diff] [blame] | 74 | |
Daniel P. Berrangé | bf78326 | 2021-06-22 12:51:56 +0100 | [diff] [blame] | 75 | --- explicit sha256 key checking -- |
| 76 | |
| 77 | {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "ssh", "location": {"host-key-check": {"hash": "wrong", "mode": "hash", "type": "sha256"}, "path": "TEST_DIR/PID-t.img", "server": {"host": "127.0.0.1", "port": "22"}}, "size": 2097152}}} |
| 78 | {"return": {}} |
Hanna Reitz | 48f1fcd | 2022-03-18 13:53:04 +0100 | [diff] [blame] | 79 | Job failed: remote host key fingerprint 'sha256:HASH' does not match host_key_check 'sha256:wrong' |
Daniel P. Berrangé | bf78326 | 2021-06-22 12:51:56 +0100 | [diff] [blame] | 80 | {"execute": "job-dismiss", "arguments": {"id": "job0"}} |
| 81 | {"return": {}} |
| 82 | |
| 83 | {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "ssh", "location": {"host-key-check": {"hash": "HASH", "mode": "hash", "type": "sha256"}, "path": "TEST_DIR/PID-t.img", "server": {"host": "127.0.0.1", "port": "22"}}, "size": 4194304}}} |
| 84 | {"return": {}} |
| 85 | {"execute": "job-dismiss", "arguments": {"id": "job0"}} |
| 86 | {"return": {}} |
| 87 | |
| 88 | image: TEST_IMG |
| 89 | file format: IMGFMT |
| 90 | virtual size: 4 MiB (4194304 bytes) |
| 91 | |
Kevin Wolf | 56ea745 | 2018-02-08 20:06:41 +0100 | [diff] [blame] | 92 | === Invalid path and user === |
| 93 | |
Max Reitz | 8a57a4b | 2019-02-10 15:57:36 +0100 | [diff] [blame] | 94 | {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "ssh", "location": {"host-key-check": {"mode": "none"}, "path": "/this/is/not/an/existing/path", "server": {"host": "127.0.0.1", "port": "22"}}, "size": 4194304}}} |
Max Reitz | e21b5f3 | 2018-10-22 14:53:07 +0100 | [diff] [blame] | 95 | {"return": {}} |
Pino Toscano | b10d49d | 2019-06-20 22:08:40 +0200 | [diff] [blame] | 96 | Job failed: failed to open remote file '/this/is/not/an/existing/path': SFTP server: No such file (libssh error code: 1, sftp error code: 2) |
Max Reitz | e21b5f3 | 2018-10-22 14:53:07 +0100 | [diff] [blame] | 97 | {"execute": "job-dismiss", "arguments": {"id": "job0"}} |
| 98 | {"return": {}} |
Kevin Wolf | 56ea745 | 2018-02-08 20:06:41 +0100 | [diff] [blame] | 99 | |
Max Reitz | 8a57a4b | 2019-02-10 15:57:36 +0100 | [diff] [blame] | 100 | {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "ssh", "location": {"host-key-check": {"mode": "none"}, "path": "TEST_DIR/PID-t.img", "server": {"host": "127.0.0.1", "port": "22"}, "user": "invalid user"}, "size": 4194304}}} |
Max Reitz | e21b5f3 | 2018-10-22 14:53:07 +0100 | [diff] [blame] | 101 | {"return": {}} |
Kevin Wolf | 00af193 | 2018-05-23 18:19:00 +0200 | [diff] [blame] | 102 | Job failed: failed to authenticate using publickey authentication and the identities held by your ssh-agent |
Max Reitz | e21b5f3 | 2018-10-22 14:53:07 +0100 | [diff] [blame] | 103 | {"execute": "job-dismiss", "arguments": {"id": "job0"}} |
| 104 | {"return": {}} |
Kevin Wolf | 00af193 | 2018-05-23 18:19:00 +0200 | [diff] [blame] | 105 | |