#!/bin/bash # # Preate a public/private key for passwordless logins from the current # machine. # # usage: ssh-key.sh PRIVATE_KEY="$HOME/.ssh/id_rsa" CONFIG_FILE="$HOME/.ssh/config" HOST=$(hostname -f) echo "use a long and difficult-to-guess passphrase" ssh-keygen -t rsa -f "$PRIVATE_KEY" || exit 1 cat > "$CONFIG_FILE" <