-
Notifications
You must be signed in to change notification settings - Fork 1.1k
SSH alternative to Cygwin #4
Comments
I have tried to use FreeSSHD instead of Cygwin with Packer, but it just connects and disconnects. That is what I can see in FreeSSHD.log. |
Here is output from Packer with OpenSSHd for Windows 5.3. @StefanScherer Thanks for pointing me to freeSSHD. What packer output are you getting with this? |
@dylanmei Thanks for the hint with the log file. I forgot about that. The packer log file says following error: So, freeSSHD seems to be a dead end. I will stop my investigations here. |
@StefanScherer it would be fairly trivial to create a removal script. I'll take a look at doing that tomorrow, but please note that it will only run on first boot of the resulting box. I.e. you'll be distributing boxes with Cygwin / SSHd, but they will not be available once the box starts up for the first time. |
Because packer doesn't need SSH anymore once shutdown_command is issued, there's no reason why shutdown_command = "cmd /c my-shutdown.bat" can't run a script that tears down Cygwin/OpenSSH. Forgot to add, the reason I'm investing so much time in OpenSSH 6.2 package is that Cygwin recently broke their silent installer. http://cygwin.com/ml/cygwin/2013-10/msg00006.html. Even if they fix it soon, it's left me with a bad taste. Shifting to the smaller OpenSSH 6.2 is going really well although I'm having to re-write our .sh provisioning files as .bat since the there's not as much unix-y stuff here. |
@dylanmei Good point - and makes sense. Excited to see where you get to on the conversion to .bat + OpenSSH. |
I like the idea of removing cygwin before shutting down the VM. I have tried it in a vagrant box, my first try of a simple bat script is here https://gist.github.com/StefanScherer/6874808 |
@StefanScherer http://cygwin.com/faq/faq.html#faq.setup.uninstall-all Looks like it needs to be done manually, and you've got most of the steps. Why not just do a sleep at the start of the script to give packer time to disconnect from ssh? Then you can remove the extra The missing link is running the batch script and terminating immediately (i.e. we don't want to do a |
@joefitzgerald Yes, starting the command into the background is a good idea. I have tried it in my win7 basebox and committed my working version into https://github.com/StefanScherer/basebox-packer/tree/master/template/stefan-win7x64. |
@dylanmei Where'd you get to with the switch to OpenSSH - can I help? Would love to switch as soon as possible. |
Actually I'm very close. I've run the gauntlet on 2012 vmware/virtualbox and am just now validating 2008 r2 on virtualbox.
I can make a pull req on this now if you are interested in smoking out any issues? |
Yes, please - happy to take a look over a PR, and fix anything that comes up. I'm stubborn so I'll try to dig more with packer 3.9, also. :) |
Being stubborn is a requirement to working on this stuff ;) |
…tainerhost Fix Install-ContainerHost.ps1 by downloading older commit
Regarding issue #3 comment by @sneal: In fact I'd rather not install Cygwin if I could.
I am having some success using OpenSSH for Windows 5.3 from coming from Chocolatey and also the 6.2 from mls-software.
The initial ssh handshake and scp operation to copy over .vbox_version work great but any subsequent scp operations blow up. I'm hoping it's something I can fix from the sshd configuration side, but it's strange how I can ssh and scp manually just fine but packer can't do more than one run against it. Investigation ongoing....
If there are similar ideas out there, I'd like to hear about it before I go too far down the rabbit hole.
The text was updated successfully, but these errors were encountered: