Using SSH keys for Password-less Logins
Most people start using SSH by logging in with a password, but re-entering your password for every SSH connection quickly becomes tedious. A better way is to set up a public/private key pair - you unlock your key once and then reuse it to make connections without entering your password. It may sound a bit complicated but you can set it up with two simple commands* ssh-keygen ssh-copy-id hostname You run the first command once to set up your public/private key pair and then you run the second command once for each host you want to connect to. These steps are spelled out in more detail below, but those two commands are all you need to get going. * This guide assumes you're running GNOME on a modern desktop Linux distribution such as Ubuntu, Debian, Fedora etc. Step 0: Think of a password Before we start with step 1, you'll need to think of a password. It's always difficult to think up a new password. Step 1: Generate a key pair ssh-keygen You'll be prompted for a filename - just press Enter.