Bug 215 - No warning for failed ssh -v -R
Summary: No warning for failed ssh -v -R
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: ssh (show other bugs)
Version: -current
Hardware: UltraSPARC Solaris
: P2 normal
Assignee: Markus Friedl
URL:
Keywords:
: 43 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-04-13 01:51 AEST by Russ Radke
Modified: 2004-04-14 12:24 AEST (History)
1 user (show)

See Also:


Attachments
please try this (3.33 KB, patch)
2002-04-15 00:52 AEST, Markus Friedl
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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