Quantcast
Viewing all articles
Browse latest Browse all 2

Properly implement REMOTE_USER-like thing for ssh

I'd like to know how to make the remote user name available in an ssh session on my server. So when joe@host1 logs in as commonuser@server1, the scripts running on server1 running as commonuser will know that the person running them is actually joe.

  1. I tried SendEnv / AcceptEnv without luck. I even looked at SSH debug output and it looked like the environment variable was sent, but when I do

    echo $REMOTE_USER

    I see empty string.

  2. I would also like this to be working even if joe is less cooperative, for example when he refuses to set the REMOTE_USER variable.


Viewing all articles
Browse latest Browse all 2

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>