Files
lokale-scripte/copy-ssh-keys-to-server.sh
T
2020-03-26 16:07:10 +01:00

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