Open PowerShell (Start Menu → type "PowerShell", then open it).
Run this command to create a new key:
You’ll see this prompt:
- Just press Enter to accept the default location.
Then:
- You can leave it empty (just press Enter), or set a passphrase if you want more security.
It will say:
Add to Server
- SSH into your server, then:
- Paste the copied key into a new line.
- Save and exit (
Ctrl + X, thenY, then Enter). - Restart SSH (optional, usually not needed unless configs changed):
SSHD config
Include /etc/ssh/sshd_config.d/*.conf
Port xxxx
LogLevel DEBUG3
RSAAuthentication yes
LoginGraceTime 30
MaxAuthTries 3
PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys
PermitEmptyPasswords no
KbdInteractiveAuthentication no
UsePAM yes
X11Forwarding yes
PrintMotd no
ClientAliveInterval 300 # Disconnect idle sessions
ClientAliveCountMax 2 # Max allowed idle sessions
AcceptEnv LANG LC_*
Subsystem sftp /usr/lib/openssh/sftp-server
PermitRootLogin prohibit-password
PasswordAuthentication no