port forwarding with binding to specific IP on remote host

Hi all,

I want to establish an SSH tunnel. The remote host of
the SSH connection has two IP addresses that may be used
for outgoing connections. I want the ssh-tunnel to use
the non-default connection for the "forwarded" connection:

local host has IP

remote host has IPs (eth0) and (eth0:1).

I want to establish a tunnel from to using the remote host's IP

When I use

ssh -L 1234: root@xxxxxxxxx

the connection from my client host to the remote host
is established *to* IP (of course), but the
host sees IP as source IP for my
connection. But I want it to see as source IP.

Is it possible to solve this with pure ssh-magic, or
do I have to create iptables rules or special routing
table entries for this?

Thanks and best regards

Dipl. Inf. (FH) Stefan Palme

email: kleiner@xxxxxxxxxxxxxxx
Key fingerprint = 1BA7 D217 36A1 534C A5AD F18A E2D1 488A E904 F9EC


Relevant Pages

  • Re: How to create an ssh chain A->B->C to do http over ssh across the chain?
    ... running the following on host A: ... will be forwarded over an SSH connection to port 8080 on host B. The ... second "ssh" command running on B, meanwhile, will then act as a SOCKS ...
  • Re: Password Guessing
    ... > I have an ssh gateway linux-box which is the victim of daily visits by ... Like this, on any ssh connection the script ssh-throttle will be called, ... supplied with the IP address of the source host, ...
  • ssh / keyless login problem
    ... OpenSSH_3.6.1p2, SSH protocols 1.5/2.0, OpenSSL 0x0090701f ... I am using rsync to backup my local host to a remote host over ssh. ... The first time the script runs after a long delay (ie overnight when the local ...
  • Re: rcp and rlogin
    ... I just tried three ssh connections to work to machines my ip should not be ... Connection closed by remote host ... ssh: connect to host port 22: Connection timed out ...
  • Question on SSH configuration in a cluster environment.
    ... When a failover happens in a cluster, ... known_hosts file is picking up the public key from the physical host. ... In investigating the ssh configuration issue for the cluster I have ... there are ssh connection issues because the host_keys are ...