Skip to content

Instantly share code, notes, and snippets.

@rizplate
Forked from yuvadm/fabfile.py
Created September 13, 2018 17:42
Show Gist options
  • Save rizplate/a751a41374736f407c3356f581e543b8 to your computer and use it in GitHub Desktop.
Save rizplate/a751a41374736f407c3356f581e543b8 to your computer and use it in GitHub Desktop.
Fabric example for SSH keyfile connection
from fabric.api import *
env.hosts = ['host.name.com']
env.user = 'user'
env.key_filename = '/path/to/keyfile.pem'
def local_uname():
local('uname -a')
def remote_uname():
run('uname -a')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment