John Williams <john.williams@petalogix.com>
Michael Santos <michael.santos@gmail.com>
Alex Jia <ajia@redhat.com>
+ Oskari Saarenmaa <os@ohmu.fi>
[....send patches to get your name here....]
<td>
<code>no_verify</code>
</td>
- <td> tls </td>
- <td>
- If set to a non-zero value, this disables client checks of the
+ <td> ssh, tls </td>
+ <td>
+ SSH: If set to a non-zero value, this disables client's strict host key
+ checking making it auto-accept new host keys. Existing host keys will
+ still be validated.
+ <br/>
+ <br/>
+ TLS: If set to a non-zero value, this disables client checks of the
server's certificate. Note that to disable server checks of
the client's certificate or IP address you must
<a href="#Remote_libvirtd_configuration">change the libvirtd
command,
username,
no_tty,
+ no_verify,
netcat ? netcat : "nc",
sockname)))
goto failed;
const char *binary,
const char *username,
bool noTTY,
+ bool noVerify,
const char *netcat,
const char *path)
{
virNetSocketPtr sock;
- if (virNetSocketNewConnectSSH(nodename, service, binary, username, noTTY, netcat, path, &sock) < 0)
+ if (virNetSocketNewConnectSSH(nodename, service, binary, username, noTTY, noVerify, netcat, path, &sock) < 0)
return NULL;
return virNetClientNew(sock, NULL);
const char *binary,
const char *username,
bool noTTY,
+ bool noVerify,
const char *netcat,
const char *path);
const char *binary,
const char *username,
bool noTTY,
+ bool noVerify,
const char *netcat,
const char *path,
virNetSocketPtr *retsock)
if (noTTY)
virCommandAddArgList(cmd, "-T", "-o", "BatchMode=yes",
"-e", "none", NULL);
+ if (noVerify)
+ virCommandAddArgList(cmd, "-o", "StrictHostKeyChecking=no", NULL);
virCommandAddArgList(cmd, nodename,
netcat ? netcat : "nc",
"-U", path, NULL);
const char *binary,
const char *username,
bool noTTY,
+ bool noVerify,
const char *netcat,
const char *path,
virNetSocketPtr *addr);
const char *binary;
const char *username;
bool noTTY;
+ bool noVerify;
const char *netcat;
const char *path;
data->binary,
data->username,
data->noTTY,
+ data->noVerify,
data->netcat,
data->path,
&csock) < 0)
.username = "fred",
.netcat = "netcat",
.noTTY = true,
+ .noVerify = false,
.path = "/tmp/socket",
.expectOut = "-p 9000 -l fred -T -o BatchMode=yes -e none somehost netcat -U /tmp/socket\n",
};
ret = -1;
struct testSSHData sshData3 = {
- .nodename = "nosuchhost",
+ .nodename = "somehost",
+ .service = "9000",
+ .username = "fred",
+ .netcat = "netcat",
+ .noTTY = false,
+ .noVerify = true,
.path = "/tmp/socket",
- .failConnect = true,
+ .expectOut = "-p 9000 -l fred -o StrictHostKeyChecking=no somehost netcat -U /tmp/socket\n",
};
if (virtTestRun("SSH test 3", 1, testSocketSSH, &sshData3) < 0)
ret = -1;
struct testSSHData sshData4 = {
+ .nodename = "nosuchhost",
+ .path = "/tmp/socket",
+ .failConnect = true,
+ };
+ if (virtTestRun("SSH test 4", 1, testSocketSSH, &sshData4) < 0)
+ ret = -1;
+
+ struct testSSHData sshData5 = {
.nodename = "crashyhost",
.path = "/tmp/socket",
.expectOut = "crashyhost nc -U /tmp/socket\n",
.dieEarly = true,
};
- if (virtTestRun("SSH test 4", 1, testSocketSSH, &sshData4) < 0)
+ if (virtTestRun("SSH test 5", 1, testSocketSSH, &sshData5) < 0)
ret = -1;
#endif