I suspect that, whatever you want to do, you have some misconception about how things work with ssh and/or web servers.
1) You can (maybe) find out who is accessing a web page from the information his browser is sending or from the whatever the user is providing on the web page, but accessing that information has nothing to do with the user who is running the web server
2) ssh-keygen creates a key-pair, the public key of that pair has first to be transported to the remote host before the CGI script can login without using a password. But that still doesn't mean that the CGI script has to run as a specific user to login to the remote host as that user. That's what the -l parameter of ssh is for, to login as any user you want on the other host.
3) Whoever posesses the secret key of that key pair can login to the remote user with the public key, it doesn't matter whether he is perlnewbie or nobody
|