Package: libvirt0
Version: 0.5.1-4
Severity: major
(major since it makes it unusable if you move ssh to a non-standard
port)
For some bizarre reason, libvirt forces the port when it calls ssh to
22. Why they don't just leave it empty I don't know - 22 _is_ the
default and you could always override it in ~/.ssh/config.
Anyway, this turns off this silly bit of code. If it gains the
ability to _override_ the port in future, then fine.
Thanks for packaging this - now I look forward to being able to use
virt-manager (which also had this dumb hardcoding but went a step
further in that it also talked as root because remote root access is
such a _good_ idea!)
Adrian
--
Email: [email protected] -*- GPG key available on public key servers
Debian GNU/Linux - the maintainable distribution -*- www.debian.org
--- src/remote_internal.c.orig 2009-01-30 17:19:20.000000000 +0000
+++ src/remote_internal.c 2009-01-30 17:22:23.000000000 +0000
@@ -353,9 +353,6 @@
} else if (transport == trans_tcp) {
port = strdup (LIBVIRTD_TCP_PORT);
if (!port) goto out_of_memory;
- } else if (transport == trans_ssh) {
- port = strdup ("22");
- if (!port) goto out_of_memory;
} else
port = NULL; /* Port not used for unix, ext. */
@@ -654,14 +651,16 @@
goto out_of_memory;
// Generate the final command argv[] array.
- // ssh -p $port [-l $username] $hostname $netcat -U $sockname [NULL]
+ // ssh [-p $port] [-l $username] $hostname $netcat -U $sockname [NULL]
if (VIR_ALLOC_N(cmd_argv, nr_args) < 0)
goto out_of_memory;
j = 0;
cmd_argv[j++] = strdup (command);
- cmd_argv[j++] = strdup ("-p");
- cmd_argv[j++] = strdup (port);
+ if (port) {
+ cmd_argv[j++] = strdup ("-p");
+ cmd_argv[j++] = strdup (port);
+ }
if (username) {
cmd_argv[j++] = strdup ("-l");
cmd_argv[j++] = strdup (username);