What we do?
- Generate the New SSH Key
- Copy the Public Key to the Server
- Configure the SSH Client
- Test the Connection
At a glance to see Diagram
To Do
1. Generate the New SSH Key (whithout passphrase)
ssh-keygen -t ed25519 -f ~/.ssh/id_rsa_deploy -N ""
2. Copy the Public Key to the Server
ssh-copy-id -i ~/.ssh/id_rsa_deploy.pub server-user@server-ip
- Configure the SSH Client
Host deploy-server
HostName server-ip
User server-user
IdentityFile ~/.ssh/id_rsa_deploy
IdentitiesOnly yes
- Test the Connection
ssh deploy-server
(Important): Fix permissions (if SSH refuses key)
Run these on your deployment machine:
chmod 700 ~/.ssh
chmod 600 ~/.ssh/deploy_key
chmod 644 ~/.ssh/deploy_key.pub
chmod 600 ~/.ssh/config

Top comments (0)