1 === Successful image creation (defaults) ===
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}}}
5 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
10 virtual size: 4 MiB (4194304 bytes)
15 virtual size: 4 MiB (4194304 bytes)
17 === Test host-key-check options ===
19 --- no host key checking --
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}}}
23 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
28 virtual size: 8 MiB (8388608 bytes)
30 --- known_hosts key checking --
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}}}
34 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
39 virtual size: 4 MiB (4194304 bytes)
41 --- explicit md5 key checking --
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}}}
45 Job failed: remote host key fingerprint 'md5:HASH' does not match host_key_check 'md5:wrong'
46 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
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}}}
51 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
56 virtual size: 8 MiB (8388608 bytes)
58 --- explicit sha1 key checking --
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}}}
62 Job failed: remote host key fingerprint 'sha1:HASH' does not match host_key_check 'sha1:wrong'
63 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
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}}}
68 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
73 virtual size: 4 MiB (4194304 bytes)
75 --- explicit sha256 key checking --
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}}}
79 Job failed: remote host key fingerprint 'sha256:HASH' does not match host_key_check 'sha256:wrong'
80 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
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}}}
85 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
90 virtual size: 4 MiB (4194304 bytes)
92 === Invalid path and user ===
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}}}
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"}}
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}}}
102 Job failed: failed to authenticate using publickey authentication and the identities held by your ssh-agent
103 {"execute": "job-dismiss", "arguments": {"id": "job0"}}