David
David

Reputation: 367

Add SSH-Key for nginx user (for github)

I'm running into a bit of issues with nginx and SSH keys.

I need to add a ssh key for the nginx user to access private github repositories and then run the "git ..." commands to pull or clone the repo onto my Ubuntu box.

With the nginx user just being a worker task is it possible to generate a key for this user?

Thanks for any help!

Upvotes: 2

Views: 4913

Answers (1)

Blender
Blender

Reputation: 298354

You can run commands as another user without having to provide their password using sudo:

$ sudo -u nginx ssh-keygen -t rsa -C "[email protected]"

Upvotes: 11

Related Questions