Gregg's MOTD

Tips & Tricks that I've Encountered Over the Years...

Creating Passwordless SSH Keys

May 14, 2023 — Gregg Szumowski


Create the key. Note those are two single quotes after the -N (for a blank passwd)
$ ssh-keygen -t rsa -b 4096 -N ''

Copy it to the target server
$ cat .ssh/idrsa.pub | ssh [email protected] 'cat >> .ssh/authorizedkeys'

Test it
$ ssh [email protected]

Tags: ssh, motd