/ Published in: Bash
SSH certificate distribution - never enter another password
Expand |
Embed | Plain Text
#!/bin/bash if [ ! -f ~/.ssh/id_dsa.pub ] then echo 'id_dsa.pub does not exist, creating' ssh-keygen -tdsa fi ssh $1 '[ ! -e .ssh ] && mkdir .ssh ; [ ! -e .ssh/authorized_keys ] && touch .ssh/authorized_keys ; cat >> .ssh/authorized_keys' < ~/.ssh/id_dsa.pub
You need to login to post a comment.
