Bug 215

Summary: No warning for failed ssh -v -R
Product: Portable OpenSSH Reporter: Russ Radke <russ.radke>
Component: sshAssignee: Markus Friedl <markus>
Status: CLOSED FIXED    
Severity: normal CC: mak-mindrot-bugzilla
Priority: P2    
Version: -current   
Hardware: UltraSPARC   
OS: Solaris   
Attachments:
Description Flags
please try this none

Description Russ Radke 2002-04-13 01:51:47 AEST
Folks,

I am using 2.9p2, but Markus Friedl said to submit this, so I didn't bother
upgrading and
re-checking the problem.

When you ssh -R, and the remote port that you are trying to forward is already
forwarded,
the forwarding that you request with the -R option will fail, but the only way
to find this
out is to look at the security logs on the remote machine, where sshd reports
that the port
is already in use.  ssh -v -v -v -R does not mention anything other than:

debug1: Connections to remote port 2222 forwarded to local address strad:1111

while the logs on the remote machine contain:

Apr 11 16:21:44 odin sshd[3808]: Accepted publickey for russr from ###.###.##.#
port 50191 ssh2
Apr 11 16:21:44 odin sshd[3808]: error: bind: Address already in use
Apr 11 16:21:44 odin sshd[3808]: error: channel_request_forwarding: cannot
listen to port: 2222

It would make debugging connections a lot easier if ssh -v -R would give you a
warning
that the port forwarding you requested had failed.

Thanks,

R.
Comment 1 Markus Friedl 2002-04-15 00:52:41 AEST
Created attachment 73 [details]
please try this
Comment 2 Markus Friedl 2002-04-15 00:55:20 AEST
i'll look into this. check the attached patch.
Comment 3 Damien Miller 2002-04-17 11:12:42 AEST
*** Bug 43 has been marked as a duplicate of this bug. ***
Comment 4 Markus Friedl 2002-04-23 07:09:41 AEST
patch applied.
Comment 5 Damien Miller 2004-04-14 12:24:18 AEST
Mass change of RESOLVED bugs to CLOSED