Skip to content

Instantly share code, notes, and snippets.

View mastergenius's full-sized avatar

Evgeny Shcherbinin mastergenius

View GitHub Profile
@mastergenius
mastergenius / fabfile.py
Created November 21, 2012 07:29
Append ssh public key to remote servers with fabric
from fabric.api import local, run, env, cd
from fabric.contrib import files
import os
#env.hosts = []
PUB_KEY = "~/.ssh/id_rsa.pub"
def install_public_key(pubkey_file=PUB_KEY):
with open(os.path.expanduser(pubkey_file)) as fd: