"ssh -b x.x.x.x" or "ssh -o BindAddress=x.x.x.x" does not work.

Bug #816313 reported by m.bosner
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openssh (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

I got a machine which has eight public ip addresses bound to eth0, eth0:0, eth0:1, eth0:2 etc.

If i try to bind an address using -b for outgoing connections it just fails to do so but creates the connection without any warning or message:

ssh -v -o UsePrivilegedPort=no -o BindAddress=x.x.x.131 other-host.com
or
ssh -v -b x.x.x.131 other-host.com

OpenSSH_5.8p1 Debian-1ubuntu3, OpenSSL 0.9.8o 01 Jun 2010
debug1: Reading configuration data /root/.ssh/config
debug1: Applying options for *
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to other-host.com [x.x.x.x] port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: identity file /root/.ssh/id_rsa type -1
debug1: identity file /root/.ssh/id_rsa-cert type -1
debug1: identity file /root/.ssh/id_dsa type -1
debug1: identity file /root/.ssh/id_dsa-cert type -1
debug1: identity file /root/.ssh/id_ecdsa type -1
debug1: identity file /root/.ssh/id_ecdsa-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.5p1 Debian-4ubuntu5
debug1: match: OpenSSH_5.5p1 Debian-4ubuntu5 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.8p1 Debian-1ubuntu3
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Server host key: RSA a8:4b:a6:8f:0e:56:96:cb:df:15:31:84:de:30:5e:fe
debug1: Host 'other-host.com' is known and matches the RSA host key.
debug1: Found key in /root/.ssh/known_hosts:20
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Offering RSA public key: mbosner@S510-X-CBCEG
debug1: Authentications that can continue: publickey,password
debug1: Trying private key: /root/.ssh/id_rsa
debug1: Trying private key: /root/.ssh/id_dsa
debug1: Trying private key: /root/.ssh/id_ecdsa
debug1: Next authentication method: password
<email address hidden>'s password:
debug1: Authentication succeeded (password).
Authenticated to other-host.com ([x.x.x.x]:22).
debug1: channel 0: new [client-session]
debug1: Requesting <email address hidden>
debug1: Entering interactive session.
debug1: Requesting authentication agent forwarding.
debug1: Sending environment.
debug1: Sending env LANG = en_US.UTF-8
Linux gatekeeper 2.6.35-30-generic #54-Ubuntu SMP Tue Jun 7 18:41:54 UTC 2011 x86_64 GNU/Linux
Ubuntu 10.10

Welcome to Ubuntu!
 * Documentation: https://help.ubuntu.com/
New release 'natty' available.
Run 'do-release-upgrade' to upgrade to it.

You have new mail.
Last login: Tue Jul 26 10:58:03 2011 from x.x.x.130 <- IMPORTANT!

netstat -at | grep EST
tcp 0 0 x.x.x.x:ssh x.x.x.130:46113 ESTABLISHED <-

The outgoing address is x.x.x.130 instead of x.x.x.131
---
Architecture: amd64
DistroRelease: Ubuntu 11.04
Package: openssh-client 1:5.8p1-1ubuntu3
PackageArchitecture: amd64
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.38-10.46-server 2.6.38.7
RelatedPackageVersions:
 ssh-askpass N/A
 libpam-ssh N/A
 keychain N/A
 ssh-askpass-gnome N/A
SSHClientVersion: OpenSSH_5.8p1 Debian-1ubuntu3, OpenSSL 0.9.8o 01 Jun 2010
Tags: natty
Uname: Linux 2.6.38-10-server x86_64
UpgradeStatus: Upgraded to natty on 2011-07-24 (3 days ago)
UserGroups:

Revision history for this message
James Page (james-page) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. Please execute the following command, as it will automatically gather debugging information, in a terminal on the machine you are initiating the connection from:

 apport-collect 816313

When reporting bugs in the future please use apport by using 'ubuntu-bug' and the name of the package affected. You can learn more about this functionality at https://wiki.ubuntu.com/ReportingBugs.

Changed in openssh (Ubuntu):
status: New → Incomplete
Revision history for this message
m.bosner (m-bosner) wrote :

Changed affected package name.

Revision history for this message
m.bosner (m-bosner) wrote : Dependencies.txt

apport information

tags: added: apport-collected natty
description: updated
Changed in openssh (Ubuntu):
status: Incomplete → New
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Marking importance Medium since this only affects one portion of ssh (the bind address functionality).

Changed in openssh (Ubuntu):
importance: Undecided → Medium
Revision history for this message
m.bosner (m-bosner) wrote :

This seems to be fixed in the latest version (OpenSSH_5.8p1 Debian-1ubuntu3, OpenSSL 0.9.8o 01 Jun 2010)

Changed in openssh (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.