Skip to content

Instantly share code, notes, and snippets.

@yuvadm
Created March 16, 2011 13:41
Show Gist options
  • Save yuvadm/872506 to your computer and use it in GitHub Desktop.
Save yuvadm/872506 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')
@karthikvee
Copy link

Despite defining the env.hosts = ['host-name.fqdn-format']. Following input is asked during execution:
No hosts found. Please specify (single) host string for connection:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment