sync/zsh/config.zsh

6 lines
255 B
Bash
Raw Normal View History

2016-07-16 15:48:23 -04:00
copy_ssh_keys() {
cat ~/.ssh/authorized_keys | ssh $* '(test -f ~/.ssh/id_rsa || ssh-keygen -t rsa -b 4096 -f ~/.ssh/id_rsa -N "") </dev/null && cat > ~/.ssh/authorized_keys'
echo -n "Testing..."
ssh -o PasswordAuthentication=no $* 'echo Success'
}