Man hat eine neue Maschine und möchte schnell seinen SSH-Key dort unterbringen. Das geht mit nur einmal Passwort eingeben so:
#!/bin/sh
host=$1
cat ~/.ssh/id_dsa.pub | ssh $host "(tee > ~/public.key; mkdir ~/.ssh; chmod 0700 ~/.ssh; cat ~/public.key >> ~/.ssh/authorized_keys; chmod 0600 ~/.ssh/authorized_keys )"

