Public key for pasting into OpenSSH authorized_keys file
Public key for pasting into OpenSSH authorized_keys file
Public key for pasting into OpenSSH authorized_keys file
mkdir -p ~/.ssh
chmod 700 ~/.ssh
mkdir -p ~/.ssh
chmod 700 ~/.ssh
mkdir -p ~/.ssh
chmod 700 ~/.ssh
nano ~/.ssh/authorized_keys
nano ~/.ssh/authorized_keys
nano ~/.ssh/authorized_keys
Ctrl + O → Enter → Ctrl + X
Ctrl + O → Enter → Ctrl + X
Ctrl + O → Enter → Ctrl + X
chmod 600 ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
Connection → Data
Connection → Data
Connection → Data
Auto-login username: your_username (e.g., root / ubuntu)
Auto-login username: your_username (e.g., root / ubuntu)
Connection → SSH → Auth → Credentials
Connection → SSH → Auth → Credentials
Connection → SSH → Auth → Credentials - Instead of typing a password every time
- You use a private key file stored on your computer
- The server verifies it using a public key - Private Key (.ppk) → stays on your PC
- Public Key → goes to your server - Open PuTTYgen (comes with PuTTY)
- Under Parameters, select: - Ed25519 (modern, faster, more secure than RSA) - Click Generate
- Move your mouse randomly (this generates randomness) - Click Save private key
- Save it somewhere safe (very important ⚠️) - Copy the public key from: - Right-click in PuTTY → it will paste automatically - Set: Auto-login username: your_username (e.g., root / ubuntu) - Select your .ppk file - Go back to: - Enter: Host Name (IP)
Saved Session name (e.g., My Production VPS)
- Host Name (IP)
- Saved Session name (e.g., My Production VPS) - Host Name (IP)
- Saved Session name (e.g., My Production VPS) - Double-click your saved session - Login with password every time
- Risk of brute-force attacks
- Slower CI/CD setup - Instant login using SSH key
- Easy automation (GitHub Actions, scripts)
- Much more secure - Better security
- Faster access
- Easier automation