mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/virt-viewer
synced 2025-12-30 18:31:52 +00:00
Don't print incorrect port numbers
The port isn't 22 when we connect to an alternate port given in .ssh/config.
This commit is contained in:
parent
1c00bc2b95
commit
60145f31a6
@ -635,6 +635,8 @@ virt_viewer_app_activate(VirtViewerApp *self)
|
||||
if (priv->transport &&
|
||||
g_strcasecmp(priv->transport, "ssh") == 0 &&
|
||||
!priv->direct) {
|
||||
gchar *p = NULL;
|
||||
|
||||
if (priv->gport) {
|
||||
virt_viewer_app_trace(self, "Opening indirect TCP connection to display at %s:%s\n",
|
||||
priv->ghost, priv->gport);
|
||||
@ -642,8 +644,12 @@ virt_viewer_app_activate(VirtViewerApp *self)
|
||||
virt_viewer_app_trace(self, "Opening indirect UNIX connection to display at %s\n",
|
||||
priv->unixsock);
|
||||
}
|
||||
virt_viewer_app_trace(self, "Setting up SSH tunnel via %s@%s:%d\n",
|
||||
priv->user, priv->host, priv->port ? priv->port : 22);
|
||||
if (priv->port)
|
||||
p = g_strdup_printf(":%d", priv->port);
|
||||
|
||||
virt_viewer_app_trace(self, "Setting up SSH tunnel via %s@%s%s\n",
|
||||
priv->user, priv->host, p ? p : "");
|
||||
g_free(p);
|
||||
|
||||
if ((fd = virt_viewer_app_open_tunnel_ssh(priv->host, priv->port,
|
||||
priv->user, priv->ghost,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user