Bootstrap a linux node from a windows chef workstation


#1

I am trying out the chefdk in a windows workstation. How do you enable SSH on a windows workstation to bootstrap Linux nodes? I tried installing OpenSSH, so that i can use the windows power shell. But i keep getting ssh private key’s permission error.
The linux way of chmod 'ing 400 for the priv key doesnt fix it. Tried 700 for the .ssh folder still no go.

i un-install the chefDK, to get the ssh working with the OpenSSH first and restarted my win8 pc, now the chmod isn’t working either- great!!!

Any help!


#2

I recently bloged about this here. If you have git, you have ssh. Just need to add C:/Program Files/Git/usr/bin to your path.


#3

Thanks Matt,
i have the linux tool now set via git. While ssh 'ing it always prompts for a passphrase (which isn’t there).
In my linux box, i use to set the .ssh dir to 700, and the private key to 600 to get this working.

But here in this windows box, i did ran the commands, but not sure if its reflecting on the files/dir at all. how can we check this? the ls -l (on powershell) doesn’t show the user and grp info too.
And the ssh keeps prompting for a password!

C:\Users\niristotle.okram.ssh> ssh centos@ec2-54-187-211-31.us-west-2.compute.amazonaws.com
centos@ec2-54-187-211-31.us-west-2.compute.amazonaws.com’s password:
C:\Users\niristotle.okram.ssh> ssh centos@ec2-54-187-211-31.us-west-2.compute.amazonaws.com -i .\id_rsa
centos@ec2-54-187-211-31.us-west-2.compute.amazonaws.com’s password:
C:\Users\niristotle.okram.ssh> chmod 600 .\id_rsa
C:\Users\niristotle.okram.ssh> ssh centos@ec2-54-187-211-31.us-west-2.compute.amazonaws.com
centos@ec2-54-187-211-31.us-west-2.compute.amazonaws.com’s password:
C:\Users\niristotle.okram.ssh> chmod 700 -Rf ~/.ssh
C:\Users\niristotle.okram.ssh> ls -l C:\Users\niristotle.okram.ssh

Directory: C:\Users\niristotle.okram\.ssh

Mode LastWriteTime Length Name


-a— 2/29/2016 12:34 PM 163 config.bk
-a— 2/29/2016 11:05 AM 1696 id_dsa
-a— 2/29/2016 12:42 PM 1696 id_rsa
-a— 2/29/2016 12:44 PM 1740 known_hosts
-a— 1/5/2016 4:04 PM 1692 windows.pem
-a— 2/29/2016 12:42 PM 1696 windowschefdk.pem

C:\Users\niristotle.okram.ssh>


#4

Using git bash, i can see that permission of the .ssh dir is NOT 700 even after executing chmod 700. And the same is true for the key file it’s not still reflecting 600…

Permission setting combinations via the Windows explorer is not helping. My user belongs to the ‘Administrators’ grp on this pc.

Wonder why Microsoft always makes life difficult :rage: