4 hours ago
Generating an SSH key for a webserver
Assuming you have the SSH password for a webserver called say case and email email@example.com, you can generate a key as follows:
ssh-keygen -t rsa -b 4096 -C "email@example.com" -f ~/.ssh/case
Next, add the server, which has say username user at location case.example.com, to your ~/.ssh/config:
Host case
HostName case.example.com
User user
IdentityFile ~/.ssh/case
Then you can copy this key to the server
ssh-copy-id -i ~/.ssh/case user@case.example.com
and afterwards log in with
ssh case