security - How to get current user's ssh public key from the Linux ssh server? -


Is there a way to get a public key for a program on the server that the user used for SS login?

For example, Gitob knows that the user's "Ben" is searching his public key from his database

ssh -T git@github.com Hi < Strong> Ben ! You have successfully verified, but GitHub has not provided shell access.

My question is how to get the public key?

Only the SSH server ( sshd ) can retrieve that information . It is not exposed to the processes launched from the server, such as the shell.

The fact is that Geethub is doing this, as well, strongly suggest that Github is running a custom SSH server (i.e., OpenSSH). You must write your own SSH server to replicate this functionality.

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -