[Bug 2562] New: CanonicalizeHostname causes duplicate LocalForward attempts
bugzilla-daemon at bugzilla.mindrot.org
bugzilla-daemon at bugzilla.mindrot.org
Mon Apr 4 09:55:51 AEST 2016
https://bugzilla.mindrot.org/show_bug.cgi?id=2562
Bug ID: 2562
Summary: CanonicalizeHostname causes duplicate LocalForward
attempts
Product: Portable OpenSSH
Version: 7.1p1
Hardware: ix86
OS: Mac OS X
Status: NEW
Severity: normal
Priority: P5
Component: ssh
Assignee: unassigned-bugs at mindrot.org
Reporter: matt+openssh at snark.net
When CanonicalizeHostname reloads ssh config, LocalForward entries end
up duplicated; this causes a connection failure if ExitOnForwardFailure
is set.
test config:
Host mini
IdentityFile ~/.ssh/keys/id_rsa
LocalForward localhost:8000 localhost:80
Host *
CanonicalizeHostname yes
ExitOnForwardFailure yes
result:
mghali at ernie.int.snark.net:~$ ssh -v -F tmp/config mini
OpenSSH_7.1p1, OpenSSL 1.0.1j 15 Oct 2014
debug1: Reading configuration data tmp/config
debug1: tmp/config line 1: Applying options for mini
debug1: tmp/config line 5: Applying options for *
debug1: Re-reading configuration after hostname canonicalisation
debug1: Reading configuration data tmp/config
debug1: tmp/config line 1: Applying options for mini
debug1: tmp/config line 5: Applying options for *
debug1: Connecting to mini [192.168.0.250] port 22.
debug1: Connection established.
[...]
Authenticated to mini ([192.168.0.250]:22).
debug1: Local connections to localhost:8000 forwarded to remote address
localhost:80
debug1: Local forwarding listening on ::1 port 8000.
debug1: channel 0: new [port listener]
debug1: Local forwarding listening on 127.0.0.1 port 8000.
debug1: channel 1: new [port listener]
debug1: Local connections to localhost:8000 forwarded to remote address
localhost:80
debug1: Local forwarding listening on ::1 port 8000.
bind: Address already in use
debug1: Local forwarding listening on 127.0.0.1 port 8000.
bind: Address already in use
channel_setup_fwd_listener_tcpip: cannot listen to port: 8000
Could not request local forwarding.
Disabling CanonicalizeHostname results in a single set of port
forwarding actions and success:
mghali at ernie.int.snark.net:~$ ssh -v -F tmp/config -o
'CanonicalizeHostname no' mini
OpenSSH_7.1p1, OpenSSL 1.0.1j 15 Oct 2014
debug1: Reading configuration data tmp/config
debug1: tmp/config line 1: Applying options for mini
debug1: tmp/config line 5: Applying options for *
debug1: Connecting to mini [192.168.0.250] port 22.
debug1: Connection established.
[...]
Authenticated to mini ([192.168.0.250]:22).
debug1: Local connections to localhost:8000 forwarded to remote address
localhost:80
debug1: Local forwarding listening on ::1 port 8000.
debug1: channel 0: new [port listener]
debug1: Local forwarding listening on 127.0.0.1 port 8000.
debug1: channel 1: new [port listener]
debug1: channel 2: new [client-session]
debug1: Requesting no-more-sessions at openssh.com
debug1: Entering interactive session.
--
You are receiving this mail because:
You are watching the assignee of the bug.
More information about the openssh-bugs
mailing list