Re: port forwarding without the shell

From: Rachan Malhotra (
Date: 06/23/04

  • Next message: Pawel Jablonski: "Re: ftp true sftp"
    Date: Wed, 23 Jun 2004 00:21:23 -0400
    To: Andrius Kurtinaitis <>

    The -N option allows you to only fwd ports and not do anything else. You
    can use it with -f to run your process in the background. I recently
    used Autossh ( It is a wrapper
    that allows you to create an always-alive tunnel in the background. You
    may want to see if you can it put to use.

    The drawback with -N is that it works from client side. I'd like to know
    if there is a server side option to restrict (some) users so that they
    can only connect to the ssh server for port fwding..


    Andrius Kurtinaitis wrote:

    > Hello,
    > is it possible to do "one-shot" port forwarding if I do not have any
    > valid shell on the ssh server, I can only use it for port forwarding.
    > I read, that the normal way is to use -f and sleep 10. But I can not
    > sleep because I do not have any shell on the server side...
    > Another question is - how can I start the port forwarding in the
    > background?
    > The problem is that openSSH requires a command if I want to use the
    > option -f ("Cannot fork into background without a command to
    > execute."). If I give some dummy command like "sleep 10", it sends it
    > and gets reply immediately (because there is no shell on the server)
    > and exits immediately...
    > On the client side of ssh I use debian sarge or unstable
    > (OpenSSH_3.8.1p1 Debian 1:3.8.1p1-4, OpenSSL 0.9.7d 17 Mar 2004).
    > On the server side, I suspect, there is also some linux with openSSH,
    > maybe Red Hat.
    > Thanks
    > Andrius Kurtinaitis

  • Next message: Pawel Jablonski: "Re: ftp true sftp"