Skip to content

Instantly share code, notes, and snippets.

@kpumuk
Created August 22, 2016 20:41
Show Gist options
  • Save kpumuk/cc5a53cfb541200efb7bdff17ea3452d to your computer and use it in GitHub Desktop.
Save kpumuk/cc5a53cfb541200efb7bdff17ea3452d to your computer and use it in GitHub Desktop.
Enable bastion server for Chef knife
# ...
# your knife configurations goes here
# ...
# Bastion host SSH settings
knife[:bastion_host] = "bastion.mycorp.net"
knife[:bastion_user] = ENV["MYCORP_USER"] || ENV["CHEF_USER"] || ENV["USER"]
# If you have multiple networks, that require different MFA tokens, specify
# each network name here. (This configuration is referenced to clarify the
# token a user should employ.)
# knife[:bastion_network] = "mynet"
# By default, the proxy server is created on port 4443. You may configure the
# local bastion port here:
# knife[:bastion_local_port] = 4443
require "knife-bastion/activate"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment