in reply to Re^6: SSH daemon in Perl?
in thread SSH daemon in Perl?

Then you don't need no steenken' login :-) The script can run as your service user and do its thing on behalf of your other users.

The "login" issue probably surfaced because most "SSH servers" let their users do things that are security relevant.

Replies are listed 'Best First'.
Re^8: SSH daemon in Perl?
by robs87 (Novice) on Jun 24, 2016 at 14:10 UTC

    Yes, that's the kind of of functionality I would like. Connect to the server and execute the program (as the service user) without checking whether $USER (sent by the SSH client) exists.

    However, the OpenSSH server doesn't seem to have options for this. Or does it?

      Don't know enough to help with OpenSSH server config. However, the main problem I see is: you want this on port 22.
      • this will interfere with "normal" ssh login (which also uses port 22) for that machine
      • Port 22 is privileged, you need root for this
      You could take the approach many git servers do: the user named "git" has a special shell allowing only specific operations (that would correspond to your script). Since you need to be root anyway(*), this looks like the easier approach. Your users then connect
      ssh yourserviceuser@yourhost
      and if your script needs their "real" credentials, it can ask them (or, like git, distinguishes them by their SSH key).

      (*)Update: for configuration, not for running it