Files
lokale-scripte/linux/copy-ssh-keys-to-server.sh

4 lines
144 B
Bash

#!/bin/sh
cat ~/.ssh/<keyfile>.pub | ssh <server> 'mkdir -p ~/.ssh && chmod 700 ~/.ssh && cat >> ~/.ssh/authorized_keys && echo "Key copied"'