This describes the process of setting up a new user on a server with an RSA key. The user is able to control docker, and can log in to the server without a password. This enables us to use GitHub Actions to deploy our docker images to the server using SSH.
- https://nbailey.ca/post/github-actions-ssh/
- https://www.christopherbiscardi.com/copy-an-extra-key-to-a-digital-ocean-droplit
- https://www.christopherbiscardi.com/deploying-docker-images-to-digital-ocean-without-a-registry-via-git-hub-actions
- http://www.linuxproblem.org/art_9.html
ssh root@server.alifeee.co.uk
sudo useradd --create-home --user-group --shell /bin/bash --groups docker deploy
sudo usermod --lock deploy
sudo -i -u deploy
$ ssh-keygen -f ~/.ssh/id_ed25519 -C "deploy@server"
> [no password]
cat .ssh/id_ed25519.pub > .ssh/authorized_keys
scp root@server.alifeee.co.uk:/home/deploy/.ssh/id_ed25519 C:\Users\alifeee\.ssh
ssh -i C:\Users\alifeee\.ssh\id_ed25519 deploy@server.alifeee.co.uk