Being a Sudo user, is it possible to create a SSH key for an user in the same Linux server? This Sudo user doesn't have a Switch user privilege.
I have a server where I Login as sudo user say 'admin'(doesn't have switch user privilege) and I have another user say 'user1'. I have a script in my server that should run as 'user1' which should call another script running in a remote host(remote host has a similar user named 'user1') during this process, the 'user1' needs an authorized key for remote host authentication. Since the sudo user 'admin' doesn't have the privilege to switch as 'user1' and generate the ssh keys, I'll have to generate the ssh keys for 'user1' as 'admin'