Put SSH key in authorized_file of remote computer
by
Nigel Sim
—
last modified
2006-06-22 11:40
Click here to get the file
Size
1 kB
-
File type
text/x-sh
File contents
#!/bin/sh
# Puts your ssh key on a remote machine
KEY_FILE=$HOME/.ssh/id_dsa.pub
AUTHORIZED_FILE=\$HOME/.ssh/authorized_keys
cat $KEY_FILE | ssh $1 "cat >> $AUTHORIZED_FILE"