Posts Tagged ‘scp’

ssh it’s oh so quiet

Friday, April 24th, 2009

Ok, we discovered a long time ago that Telnet and FTP happily broadcast your username/password combo in plain text. So then we started using Secure shell (SSH) and Secure copy (SCP). Obviously with these being Linux based technologies there are Windows utilities such as WinSCP.

Everything is great and all are happy. However, it doesn’t stop there…

The clever bods who wrote SSH allow you to pass command line parameters to the remote system that will get executed and the output returned to your local system. Here’s an example:

ssh me@example.com ‘ls’

This will run the ls (list files) command on the remote system and return you the result, though not before prompting you for a password. So, to make the experience even smoother you can perform some magic by swapping digital keys to remove the dependency on passwords. I’ve used the following Web page a bunch of times to set up SSH login without password.

Enjoy this post and the sunny weather :)

Enterprise ready situational applications

Friday, February 6th, 2009

Where I was at: I quickly needed to expose some information. So using my laptop I created some Project Zero services written in Groovy that exposed the information via JSON and some pretty charts. My laptop is constantly in and out of its docking station. So in order to make the information available I cloned the Project Zero setup on a server and scp’d the changes across whenever I made local updates. All was fine.

Where I got to: A colleague then needed to create some additional services based on some of the work I had already done. So they cloned the Project Zero setup to their laptop and scp’d across any changes they made to the server. So as you can imagine, at this point we got into the position where we were occassionally overwriting each others updates on the server image. We needed change management.

Where I’m at today: I brought in Rational Team Concert (RTC) to act as a source code repository and change management environment for the Project Zero code. Into RTC I installed the codehaus Groovy plugin for Eclipse to provide me with Groovy syntax highlighting. A quick ant script later and I was able to deploy all the changes to the server on demand. Not stopping there, I decided that I was also fed up of breaking existing services when I was hacking away at the code. So with RTC being built on Eclipse I knew that JUnit came bundled by default. So, with a quick implementation of HTTP requests using the HttpURLConnection class (which is also bundled with Java) I then had a nice JUnit test suite to (literally) give me the green light before I check any changes in. Not only this, but my colleague then synchronized the changes into their RTC client where it picked up the JUnit tests and was able to run them on their laptop.

Project Zero, Groovy, Rational Team Concert & JUnit – what a combination. (and it puts me in a great position for TDD also!)

Where I’m at tonight: At a bar in Edinburgh, warming up for the big game on Sunday. Come on the reds!!!