User's settings in system-wide configuration file

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

I have to setup some ssh tunnels for users.

In order to simplify the setup for users, I can give a ~/.ssh/config file
with something like:

Host tunnel
    HostName my.gateway.ssh
    LocalForward 3306
    User TSE-User1

and users just type
$ ssh tunnel
and it's done.
But I want to simplify my setup and put those directives on the sshd server.

Is it possible to use a system-wide config file, like:
User TSE-User1
    LocalForward 3306

And when TSE-User1 logs in, the tunnel is automatically up.

I know that I can use directives with the "match" directives, as:
match User TSE-User1
but it's not effective for Tunnel, man says:
        Only a subset of keywords may be used on the lines following a
        Match keyword.  Available keywords are (...) <- nothing about tunnel

Any idea on how to put all configuration server-side?  

Re: User's settings in system-wide configuration file

Quoted text here. Click to load it

You can't do this. The local forwarding setup is entirely on the client
side, and the server has no way to instruct the client to do it.

- Richard

Site Timeline