207.out (5108B)
1 === Successful image creation (defaults) === 2 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}}} 4 {"return": {}} 5 {"execute": "job-dismiss", "arguments": {"id": "job0"}} 6 {"return": {}} 7 8 image: TEST_IMG 9 file format: IMGFMT 10 virtual size: 4 MiB (4194304 bytes) 11 12 13 image: TEST_IMG 14 file format: IMGFMT 15 virtual size: 4 MiB (4194304 bytes) 16 17 === Test host-key-check options === 18 19 --- no host key checking -- 20 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}}} 22 {"return": {}} 23 {"execute": "job-dismiss", "arguments": {"id": "job0"}} 24 {"return": {}} 25 26 image: TEST_IMG 27 file format: IMGFMT 28 virtual size: 8 MiB (8388608 bytes) 29 30 --- known_hosts key checking -- 31 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}}} 33 {"return": {}} 34 {"execute": "job-dismiss", "arguments": {"id": "job0"}} 35 {"return": {}} 36 37 image: TEST_IMG 38 file format: IMGFMT 39 virtual size: 4 MiB (4194304 bytes) 40 41 --- explicit md5 key checking -- 42 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}}} 44 {"return": {}} 45 Job failed: remote host key fingerprint 'md5:HASH' does not match host_key_check 'md5:wrong' 46 {"execute": "job-dismiss", "arguments": {"id": "job0"}} 47 {"return": {}} 48 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}}} 50 {"return": {}} 51 {"execute": "job-dismiss", "arguments": {"id": "job0"}} 52 {"return": {}} 53 54 image: TEST_IMG 55 file format: IMGFMT 56 virtual size: 8 MiB (8388608 bytes) 57 58 --- explicit sha1 key checking -- 59 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}}} 61 {"return": {}} 62 Job failed: remote host key fingerprint 'sha1:HASH' does not match host_key_check 'sha1:wrong' 63 {"execute": "job-dismiss", "arguments": {"id": "job0"}} 64 {"return": {}} 65 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}}} 67 {"return": {}} 68 {"execute": "job-dismiss", "arguments": {"id": "job0"}} 69 {"return": {}} 70 71 image: TEST_IMG 72 file format: IMGFMT 73 virtual size: 4 MiB (4194304 bytes) 74 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": {}} 79 Job failed: remote host key fingerprint 'sha256:HASH' does not match host_key_check 'sha256:wrong' 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 92 === Invalid path and user === 93 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}}} 95 {"return": {}} 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) 97 {"execute": "job-dismiss", "arguments": {"id": "job0"}} 98 {"return": {}} 99 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}}} 101 {"return": {}} 102 Job failed: failed to authenticate using publickey authentication and the identities held by your ssh-agent 103 {"execute": "job-dismiss", "arguments": {"id": "job0"}} 104 {"return": {}} 105