SSH trickery using -R

From: Dan Trainor (info_at_hostinthebox.net)
Date: 06/30/05

  • Next message: Mike McCarty: "Re: booting"
    Date: Wed, 29 Jun 2005 15:27:56 -0700
    To: For users of Fedora Core releases <fedora-list@redhat.com>
    
    

    Hello, all -

    Reading through ssh's man page, I found the -L and -R switches. I've
    used -L before, but not -R. -R looks... very interesting.

    So what I'd like to be able to establish is a connection to a machine
    which is behind a NAT and, well, a whole bunch of network goodies, which
    makes it not possible to connect directly to this machine from the
    "outside".

    >From what I understand by reading the man page, is that I can make an
    ssh connection to a remote machine, using the -R switch, which opens a
    port on the remote machine, which is then redirected to the local
    machine, on a port of my choosing.

    So naturally, I'd like to do something like this - from the client:

    ssh -l username -R 22:localhost:10002 remotehost

    I am able to log in to remotehost. I've even used root as the username
    just for kicks, but I am then presented with the following error regardless:

    Warning: remote port forwarding failed for listen on port 22

    What I can make of this is, I believe, a conflict with sshd. I would
    want the connection to be made TO the local port 22.

    Am I understanding the manpage wrong? Is my syntax wrong? What's the deal?

    Thanks!
    -dant

    -- 
    fedora-list mailing list
    fedora-list@redhat.com
    To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
    

  • Next message: Mike McCarty: "Re: booting"

    Relevant Pages