Using Putty only with port forwarding

From: Urs Thuermann (urs_at_isnogud.escape.de)
Date: 09/12/03


Date: 12 Sep 2003 11:18:35 +0200

On a Unix (Solaris) server I have OpenSSH 3.4p1 running. I have setup
an account which should be used by a number of users only to do port
forwarding to a given port, but they should not be able to execute a
shell or any other command. In the authorized_keys file of that
account I did

    command="bin/false",no-pty,no-X11-forwarding,permitopen="localhost:2401"\
    ssh-rsa <key-data> <comment>

This works as expected when using the OpenSSH client with -N option to
not execute a command on the remote side, i.e.

    ssh -N -f -L 2401:localhost:2401 user@server

However, some users on Windows machines want to use Putty on the
client side, and I couldn't find a way to prevent Putty from trying to
run a shell or a command on the server. In any case the server would
run /bin/false and disconnect.

One idea I haven't tried yet is to run cat >/dev/null instead of
/bin/false, so the command doesn't exit and the connection is kept.
This is not very elegant however, compared to OpenSSH's -N option. Is
there a way to cleanly do what I want with Putty?

urs



Relevant Pages

  • Re: Cant launch graphical apps from php exec() on Ubuntu 8.04 system.
    ... You can't open server programs in remote clients via HTTP. ... command on a WAMP stack, so I think the problem is likely to ... permission based, having just switched to linux, but I'm not sure. ... You can change the user account the webserver runs under, ...
    (comp.lang.php)
  • Re: Cant launch graphical apps from php exec() on Ubuntu 8.04 system.
    ... You can't open server programs in remote clients via HTTP. ... command on a WAMP stack, so I think the problem is likely to ... permission based, having just switched to linux, but I'm not sure. ... account if used as a service. ...
    (comp.lang.php)
  • Re: Server Unavailable - ASP.NET 2.0 on Windows XP
    ... The error message is "Server Application Unavailable". ... The user account I've ... Please review the permissions outlined in this article. ... So I switched to that directory in Command Prompt and tried the ...
    (microsoft.public.dotnet.framework.aspnet)
  • OpenSSH Problem -Please Help, Thank you!
    ... I was wondering if you could help me with an OpenSSH problem I ... Pageant machine to my Windows XP OpenSSH remote machine (email server) ... and the command prompt showed I was in my home directory ...
    (comp.security.ssh)
  • Re: Server Unavailable - ASP.NET 2.0 on Windows XP
    ... Please review the permissions outlined in this article. ... Make sure that the HOME-WKSTATION\ASPNET account has been assigned NTFS ... So I switched to that directory in Command Prompt and tried the following... ... I'm still getting the "Server Unavailable" error... ...
    (microsoft.public.dotnet.framework.aspnet)