Tuesday, September 27, 2005

Using pub/priv key w/ Modwest

I was never able to get the instructions from http://www.modwest.com/help/kb20-90.html to work. Here is the method I used to get things going...
NOTE: If you move to a new machine, and your old keys do not work, then simply follow the instructions below. Name of the public key file does not matter, since the CONTENTS of the file are the things that have to be added to the auth_keys files. Just make sure you don't overwrite the orginal contents of auth_keys, so you do not disturb existing users.

- download all putty tools from http://the.earth.li/~sgtatham/putty/latest/x86/putty.zip
- Unzip the contents into C:\bin (creating the folder if necessary)
- Create a C:\home folder
- Create a C:\home\.ssh folder. NOTE: You need to drop into the DOS command shell to create a folder starting with a period. (C:\> md C:\home\.ssh)
- Create a system enviornment variable HOME set to C:\home
- add C:\bin to you PATH system enviornment variable
- Launch C:\bin\PUTTYGEN.EXE
- Create a SSH2 DSA key, 1023 bits
- Do NOT add a passphrase
- Save the private key to C:\home\.ssh, giving it the name of the user account on the server where you're connecting (e.g. C:\home\.ssh\ctello2.ppk)
- Save the public key to C:\home\Public Keys\ctello2.pub
- Open C:\home\Public Keys\ctello2.pub, and modify it as follows...
* Remove the first two lines and the last line - leave only raw "goblygook" data
* Remove all the line feeds
* Add "ssh-dss " (Without quotes - NOTICE THE SPACE!!!) BEFORE the "goblygook" data
* Add " dsa-key-20050627" (Without quotes - NOTICE THE SPACE!!! - adjust the date) AFTER the "goblygook" data
- Now login to the remote system here and make sure in your home directory there is a subdirectory named: /.ssh (include the period '.' before the 'ssh'). You may need to create this directory. To see the file, you will need to type: ls -al
The .ssh directory should be chmod 700, which looks like this in the first column of a detailed file listing: -rwx------
If those are not the permissions on the .ssh dir, then set them by typing: chmod 700 .ssh
- If there are "/.ssh/authorized_keys" and "/.ssh/authorized_keys2" files, then just copy the contents of your "C:\home\Public Keys\ctello2.pub" file to BOTH "/.ssh/authorized_keys" and "/.ssh/authorized_keys2".
- If the files do not exist, copy your "authorized_keys" file 2x to the server, naming one "/.ssh/authorized_keys2" and the other "/.ssh/authorized_keys". Once the files are uploaded to the remote system, chmod 600 the two files (e.g. chmod 600 /.ssh/authorized_keys), which looks like this in the first column of a detailed file listing: -rw-------
- Run Putty
- Create a new connection with IP "shell.modwest.com", port 22, SSH
- Run C:\bin\PAGEANT.EXE - it will show up as an icon in the system tray
- Right click on the icon and select "add key"
- Select your private key (e.g. C:\home\.ssh\ctello2.ppk)
- Connect to the server - you should NOT be asked for the password
- Try using CVS - you should NOT be asked for a password

Checkout from CVS to web folder

No comments:
- CVS kind of forces us to check out to /htdocs/{projectname}/index.php instead of /htdocs/www/index.php. There might be a way around this (I'm sure there is), but we did not find it.
To work around that, we remove the symbolic link at Modwest that send everything to www, and put in a symbolic link pointing to {projectname}, so that www.oursite.com takes index.php from /htdocs/{projectname}/index.php. The commands we used to do this, using the {projectname} of e.g. myproj, were...
rm -f _
ln -s myproj _

- the cvs checkout command needs the -d option to specify where the CVSROOT dir is

- the cvs command needs to have the current directory set to the directory where checkout should occur.

- We wanted to force the checkout by calling a URL, therefore our first attempt was to write a PHP script like this...
passthru ("cd /htdocs");
passthru ("cvs -d /cvs myproj");
?>
...and put this in the /htdocs/myproj directory and call it via www.oursite.com/checkout.php. This failed, however, since the cvs command always used the php script directory instead of the directory specified in the cd command. Therefore, we wrote a shell script, checkoutCmd, and call the script.
passthru ("./checkoutCmd");
?>

- To make the checkoutCmd script, we did the following...
cd /htdocs/myproj
vi checkoutCmd
...and the script you create with vi is...
cd /htdocs
cvs -d /cvs myproj
...save the file, and do...
chmod 755 checkoutCmd
...and run it as follows...
./checkoutCmd

Checkout to the web serve folder can now be done via www.oursite.com/checkout.php

Saturday, September 10, 2005

New Machine Install

No comments:
Some of this software can be found on \\SERVER2003\Permanent\Software Depot
  • Araxis Merge (Software Depot - use serial number NOT reserved for Ed)
  • Allnetic time tracker
  • VS.NET 2003 (all options)
  • Visual Assist (\\server2003\Permanent\Software Depot\Utils\Visual Assist) - see the read me.
  • EasyPHP (http://www.easyphp.org/)- set up the files to be servered from a folder called "CVSData" in your "My Documents" folder.
  • TortoiseCVS (http://www.tortoisecvs.org/)
  • Office (the version that you DON'T have to register)
  • 7Zip (http://www.7-zip.org/). Winzip is also fine, but 7zip needed for shared Linux stuff
  • FileMaker Developer (Ed has CD)
  • Seagull FTP (look in internet)
  • WinSCP
  • Zend client & server (IMPORTANT!!! EasyPHP first. trial version to start)
  • Dreamweaver (trial version to start)
  • Putty and associated tools. See http://rocinantesoftware.blogspot.com/2005/09/using-pubpriv-key-w-modwest.html
  • Install “Send To Tools” from http://www.gabrieleponti.com/. If it’s not available there, there’s a version on \\server2003\Permanent\Software Depot\Utils
  • Cropper (screen dump utility)
  • UltraVNC
  • K-FTP (needed to build AmexImportExport) on Software Depot / utils / K-FTP
  • MySQL Connector/Net (formerly ByteFX - C# ADO.NET for MySQL)
  • Create a "FileMaker" DNS for ODBC (from the control panel). See FileMaker help for details. Increase max size setting to 1024.
  • Set up an FTP server for IIS. Also, make sure that the IIS server, if running, is NOT on Port 80 (80 needed for EasyPHP).
  • "Install" the 24U Simple Dialog plug in by following the instructions at \\server2003\Permanent\Software Depot\Plug-ins\24U Simple Dialog FM Plugin\readme.txt