1.4.all my humble thoughts about some things

31Aug/071

neues aus der Serie “I love Unix”

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 )"


Comments (1) Trackbacks (0)
  1. Mit Windows wär das nicht passiert!


Leave a comment

(required)

No trackbacks yet.