From bb18442fe8f58a483713eb2b988b3da9869ddf86 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Tue, 28 Oct 2014 10:33:20 +0100 Subject: options: Fix setting the port. Make sure we correctly read the port from the config file. Signed-off-by: Andreas Schneider --- src/client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/client.c') diff --git a/src/client.c b/src/client.c index 0a45944c..64ce5dec 100644 --- a/src/client.c +++ b/src/client.c @@ -526,7 +526,7 @@ int ssh_connect(ssh_session session) { } else { ret=ssh_socket_connect(session->socket, session->opts.host, - session->opts.port, + session->opts.port > 0 ? session->opts.port : 22, session->opts.bindaddr); } if (ret == SSH_ERROR) { -- cgit