SFTP Connection Closed - password expired?

I’ve just had an interesting problem with an SFTP account that suddenly stopped working from a cron job. When the account was used directly from the bash prompt the response was simply Connection closed immediately.

Every thing was set up correctly as far as authorized_keys and /etc/ssh/sshd_config looked fine but the account wouldn’t connect.

As I don’t have the private key for the user that was connecting to the server, I created a new key pair and added the public key to the authorized_keys file in the users .ssh folder. Using the following command I got a response that was no more helpful;

psftp logdrop@10.0.0.1 -i logdrop_pk.ppk 

This gave the response;

FATAL: Recieved unexpected end-of-file from SFTP Server 

After a couple more checks on the server and no success I decided to try

class="highlight">putty logdrop@10.0.0.1 -i... read more

Cross Join Columns in Excel

As part of a project I’m working on I need to create a cross join of users against symbols; the idea being that any of the given users might look at any of the given symbols. I have a list of users and a list of symbols which I essentially need a cross-join on.

For this example I’ll use cars and engine/transmission variants.

Lists

From these two lists I need to quickly create all possible combinations;

cross-joined lists

I can’t find any function that will do what I was so I’ve created a VBA function that will do it;

class="highlight">Function CrossJoin(r1 As Range, r2 As Range) As Variant Dim size As Integer Dim arr As Variant Dim offset As Integer size = r1.Rows.Count * r2.Rows.Count ReDim arr(0 To size, 0 To 1) offset = 0 For i = 1 To r1.Rows.Count... read more

Using yum history

I have been setting up a couple of Red Hat boxes and I need to have a cron task to mount a network share from an AD domain, copy the files then dismount.

In the past I have successfully accessed the network shares using a given set of credentials but I could not get it to work after install samba-client and samba-common.

My script on the new machine was the same as the script on the working machine so there had to be a discrepency on installed packages, step in yum history.

To get the history of yum commands use

yum history

which will give the output similar to;

yum history output

Thankfully, from the dates I was able to work out the point that I had done the install. From this point you can look at a specific item,... read more


Office365 and SharePoint iPad Friendly

I have been doing some work for a company who have a user base who primarily use iPads to access the SharePoint site. There was a requirement to allow those users to easily access the team site without getting their screens filled with the quick launch and the bloated title.

Initially, I solved this using by using JavaScript to set the page to full screen;

>window.onload = function () { //alert('has loaded'); SP.SOD.executeOrDelayUntilScriptLoaded(goToFullScreen, 'sp.js'); // For use within normal web clients function goToFullScreen() { //alert('goToFullScreen'); var isiPad = navigator.userAgent.indexOf('iPad') != -1; if(isiPad) { setTimeout(goFullScreen, 500); }... read more

TMA470 first assignment returned

I got the result and feedback for the first assignment of the final Open University project today. Its been a long week waiting for it, not least because a significant number of others on the course have been reporting back very low marks.

The difference with TM470 assignments is that they are a little more wooly in what is required. For the past 3 years, the assignments have been a series of questions that need answering in a specified order and within a specified structure. With this course we’re expected to guide the project, determine what is relevant for the content of the assignment and hope that we got it right.

I eventually got my mark, 60%. It’s work 5% of the overall module so it can be used as a learning experience. The tutor did give me some good feedback which will help when writing the next assignment for... read more