simplest ssh-key copy to server

This commit is contained in:
rob committed 2020-03-26 16:07:10 +01:00
1 parent 4c783de30d
commit c2c7932095
1 file changed
+3
+3
View File
@@ -0,0 +1,3 @@
#!/bin/sh
cat ~/.ssh/<keyfile>.pub | ssh <server> 'mkdir -p ~/.ssh && chmod 700 ~/.ssh && cat >> ~/.ssh/authorized_keys && echo "Key copied"'