Skip to content

Instantly share code, notes, and snippets.

@jtimberman
Created January 30, 2009 23:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jtimberman/55335 to your computer and use it in GitHub Desktop.
Save jtimberman/55335 to your computer and use it in GitHub Desktop.
On local system, ~root/.ssh/config:
Host chef_server
IdentityFile /root/.ssh/chef_tunnel
User chef_client
Hostname gateway.example.com
Port 2022 # open port 2022 on your firewall to NAT to 22 on chef server
LocalForward 4400 my-chef-server:4000 # chef
LocalForward 4401 my-chef-server:4001 # openid
### end .ssh/config ###
ports are > 1024, root access not necessary.
as root,
ssh-keygen -f /root/.ssh/chef_tunnel
create chef_client user on chef server.
put public ssh key w/o passphrase in ~chef_client/.ssh/authorized_keys.
on client, before connecting to chef server:
ssh chef_client@chef_server
this can go in a runit service.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment