Monthly Archives: November 2014

Windows GIT and SSH keys

gitTo use SSH keys on your windows system follow the steps below:
Install the git extensions for windows. This will (among other things) install the Git Bash shell. Execute a git bash shell. Now create your private/public key pair with the ssh-keygen command (or copy an existing key). Add a passphrase for additonal security.

On windows the ssh files are store in c:\Users\Administrator\.ssh\

Copy the public part to your git server with the ssh-copy-id command.

In Git bash edit your .profile (or create one) and add the coding snippet below:

SSH_ENV=$HOME/.ssh/environment

function start_agent
{
   echo "Initialising new SSH agent..."
   /usr/bin/ssh-agent | sed 's/^echo/#echo/' > ${SSH_ENV}
   echo succeeded
   chmod 600 ${SSH_ENV}
   . ${SSH_ENV} > /dev/null
   /usr/bin/ssh-add;
}

if [ -f "${SSH_ENV}" ]; then
   . ${SSH_ENV} > /dev/null
   ps -ef | grep ${SSH_AGENT_PID} | grep ssh-agent$ > /dev/null || {
      start_agent;
   }
else
   start_agent;
fi

If you have multiple keys you should also create a config file in the .ssh folder. In this file you specifiy which key should be used for what host; like this:

Host yourhost.nl
 IdentityFile ~/.ssh/your_key_for_this_host
Share

Create eventlog on commandline

With the command below you can easily create a new windows eventlog. The command creates an informational event in the specified source; automatically creating the source if it does not exist.

EventCreate /L Application /T Information /ID 900 /SO "Your.Eventlog" /D "With a description"

EventLogCreate
/L The eventlog to create an event inEvent
/T Information
/ID The event ID for the event
/SO The source for the event
/D is description

Share

Configure FileZilla and ProFTPD with TLS

Filezilla-logoThis post shows you how to connect to a ProFTPD server which requires a TLS connection. TLS is an extra layer of security over the standard FTP protocol used by ProFTPD.

First of all install a copy of…..FileZilla and start it up. Next go to the Site Manager (File -> Site Manager… or type Ctrl+S).

Press the New Site button and give your site a logical name; proftpd.example.com for example. Next fill out the dialog as shown below; adjust values where appropriate (host and portname for example).
Screenshot from 2014-11-11 16:35:15
Next go to the tab Transfer Settings and choose for the Transfer mode the value Active . See also the picture below.
FileZilla Site Manager

Allright that’s all for your FileZilla configuration. Press the Connect  button to make a connection with this ProFTPD instance. If you have never visitied this FTP server before in this FileZilla session a window will, probably (not if the FTP server uses a known certificate), popup which says Unknown certificate . See the dialog below.
FileZilla - Unknown Certificate

Check the Subject  and the Issuer  of the certificate; are they familiar? Yes, continue choose no otherwise. Check also the session details. The host should be the same as the one you are trying to connect to. If everything is fine you could choose to always trust this site but that is up to you.

HTH

Share