1

I am currently using rackspace cloud servers with ubuntu images, and they are mostly provisioned using fabric (a python based to to automate commands over SSH). Now I would also like to start testing my software on windows. How would I go about bootstrapping SSH or something similar so I can script the provisioning?

I read this question which suggests an ssh server. How would I bootstrap my instance to install this?

2 Answers2

1

Are you simply looking to get SSH running on the Windows instance?

If so, there are a number of free SSH servers you can simply install, just like you would any software, as suggested in that problem you linked to. I suspect that might cover your needs.

Otherwise, another option is Cygwin. Cygwin is a popular way to "do Linux things on Windows computers." It has a lot of different tools/components, but most pertinently, it has an SSH component to load on top of your Windows OS. In addition though, it'll give you a lot of the capability you need to run and execute Linux scripts and commands on a Windows instance

http://www.cygwin.com/

http://www.noah.org/ssh/cygwin-sshd.html

Univ426
  • 2,139
  • 14
  • 26
  • Yes, but how would I install Cygwin programmatically before I have SSH access? – Jasper van den Bosch Jun 13 '12 at 17:13
  • I mean, the default option for a windows server it seems is RDP as an access protocol. But how can I use this to install SSH, cygwin, python etcetera from a script? – Jasper van den Bosch Jun 13 '12 at 17:15
  • 1
    I think the key here to understand is that while Windows has some command line access like Ubuntu, the primary method you'll use to get access to the Windows server and do things on it is RDP/Remote Desktop Connection instead of SSH. Once you gain access via RDP, you could then install SSH if you'd prefer to use that instead. What kind of machine are you connecting to the server from? Ubuntu? Windows? Mac? – Univ426 Jun 13 '12 at 17:47
  • I connect from Ubuntu. But my CI server should start up several Windows instances at several points in the pipeline. Doing that by hand is just not worth it. – Jasper van den Bosch Jun 13 '12 at 18:02
  • I really wonder how other people do this. Ofcourse one option would be to install SSH on one machine by hand, than to save the image and start instances with that image. But this way you are quite dependent on that initial setup. – Jasper van den Bosch Jun 13 '12 at 18:04
  • Ah, I think I see what you're getting at, sorry, might have missed it in the initial question. Do you have any other access to a client that manages these hosts? Or are you simply being given a username/password to access the server with? – Univ426 Jun 13 '12 at 18:36
  • The latter I think, but there is an API to control the starting of the machines – Jasper van den Bosch Jun 13 '12 at 22:02
  • 1
    An alternative might be Windows Remote Shell, unfortunately that is something that needs to be enabled as well, and it's not a Linux type SSH prompt. You could image an instance of Windows with the remote shell enabled, and then write a Windows Power script to deploy SSH, but if you're going to do that, you might as well just image a copy with SSH installed barring any specific requirements. – Univ426 Jun 14 '12 at 13:29
  • Yes, through our discussion I am leaning ever more to creating a robust image with some remote access shell enabled, either SSH or Power Shell. Thanks for thinking with me. – Jasper van den Bosch Jun 14 '12 at 13:52
  • Gerne! A long comment thread haha, but hopefully it helped. Good luck! – Univ426 Jun 14 '12 at 14:21
1

You could install an SSH server of your choice, and then make an image of the system post install. Then use that image when provisioning new instances.

Or you could use a configuration management tool like Chef to provision your servers. This sort of setup is very powerful for building out new systems and standardize their configuration using recipes.

NickTX
  • 68
  • 6