Created
January 30, 2009 23:10
-
-
Save jtimberman/55335 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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