Use puTTY to automatically login a SSH session

Many thanks to Jon Lee at jonlee.ca for this excellent procedure allowing for the automtic login of a session using SSH and puTTY.exe terminal emulator. You da man!

——————————-

From his site:

As many web developers can attest to, logging into your server through SSH (Secure Shell) is one of the more common day-to-day tasks (you can even use it as a secure tunnel for your traffic). It only makes sense to automate this process which in turn can save many many keystrokes.

This how-to is written with PuTTY and Windows in mind and requires several other tools that are available from PuTTY’s website. So from their download page, make sure you have these files:

  • PuTTY (putty.exe)
  • PuTTYgen (puttygen.exe)

Then to automate SSH login, do the following:

  1. Run PuTTYgen.
  2. Select SSH-2 DSA as the Type of Key to generate.
  3. Click generate and move your mouse around to generate randomness.
  4. Click “Save Private Key” and save it somewhere on your computer.
  5. Copy the entire content inside the box to your clipboard (this is your generated public key).
  6. Login to your SSH server.
  7. Create the file ~/.ssh/authorized_keys containing the generated public key (from step 3) on a single line.
  8. Make this file readable (chmod 755).
  9. Then open up PuTTY and navigate to Connection->Data and fill in the auto-login username.
  10. Navigate to Connection->SSH->Auth and under Private-key, browse to the file you had saved earlier on your computer.

That’s it! Now you can try logging in to your SSH server and it should login automatically. If it works, make sure you save your session so you don’t have to repeat these steps every time!

Hopefully these steps work for everyone! Let me know if there are any problems.

——————————-

Had some problems with a CentOS5 server not accepting keys… found that this server was being finicky for some reason, and used this article on how to generate the keys on the Linux server, and then import the public key to the client Windows box. To make it automatically login simply do not enter any passphrase. This is probably a huge security risk or something like that, but if you’re using it on a secured LAN then perhaps it’s ok.

Posted under Linux, Network

This post was written by Content Curator on November 27, 2009

Tags: , , , , , , , , , , , , , , , , , ,

How to Fix an Windows XP System that Won’t Boot into Safe Mode

The following is totally copied from myfixes.com excellent article.

This article applies to the following type of errors:

Unmountable Boot Volume

Can’t run System Restore in normal mode or safe mode, can’t open programs

Windows XP could not start because the following file is missing or corrupt: \WINDOWS\SYSTEM32\CONFIG\…

Stop: … {Registry File Failure} The registry cannot load the hive.

System error: Lsass.exe
When trying to update a password the return status indicates that the value provided as the current password is not correct.


Resolution:

A. Boot the system into the Recovery Console and CHKDSK

1. Insert the Windows XP cd into the top cd drive
2. Turn the computer off
3. Setup the computer to boot from cd: either by pressing F2, F9 or Delete to go in BIOS or by pressing F12 on Dell computers to launch the Boot Device Menu
4. As soon as you get the message Press any key to boot from the cd hit enter.
5. Wait ~3 minutes for the Windows Setup to initialize
6. At the Welcome to Setup screen press R to repair windows using recovery console.
7. Wait a couple of minutes while setup examines the hard drive.
8. You will be prompted to choose a Windows installation. Press 1 on the top of the keyboard and then
9. You will be prompted to enter the Administrator password. Press Enter if no password was set.
10. Perform a disk check:

chkdsk /p
fixboot

11. Type exit to restart the computer.
12. As soon as the computer starts hit F8 every second to bring up the Advanced Options Menu.
13. Choose the Last Known Good Configuration.
14. If these steps didn’t resolve the issue go back in Recovery Console.



B. Perform the System Restore
Inside the Recovery Console type the following commands to change the directory to the system restore directory:

cd \
cd system~1


If you get an Access Denied error:click here
If you don’t get an Access Denied error :

cd _resto~1



If there is no _resto~1 folder or if there are no restore points inside it:click here

If the _resto~1 folder exists, inside it there are several folders named RP1, RP2. These are restore points. RP1 is the oldest restore point. You can use

dir


to view what RP folders are available. If no restore points are available click here. Otherwise choose the most convenient RP folder. Supposing we have RP3 available let’s type in:

cd rp3



Change the directory to snapshot:

cd snapshot


Restore the main registry branches. If you are being asked if you want to overwrite type in y to agree.

copy _registry_machine_system c:\windows\system32\config\system
copy _registry_machine_software c:\windows\system32\config\software

The following commands are most of the time optional however the process might not work if they are not executed

copy _registry_machine_security c:\windows\system32\config\security
copy _registry_machine_sam c:\windows\system32\config\sam
copy _registry_user_.default c:\windows\system32\config\default



Type exit to reboot the system. Start the computer normally

Based on:
The support.microsoft.com article:
http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q307545&ID=KB;EN-US;Q307545

The icompute.info article:
http://www.icompute.info/System_restore_from_xp_cd.htm

Posted under Microsoft

Adobe Download: Adobe Reader 9.1

The redistributable package of Adobe Reader 9.1, without Adobe AIR or Download Manager bundled. This is the simple Reader-only package installer, no Internet connection needed once it is downloaded.

Find all current special offers on Adobe products.

Adobe Download: Adobe Reader 9.1

If there is ever a problem when a PDF document is viewed, such as an error generated by Adobe or a failure to print the PDF file, then reinstalling the program is the best option. To do this, simply:

  1. Uninstall any currently installed “Adobe Acrobat Reader” programs in the Control Panel’s Add/Remove programs (in Windows Vista and Windows 7 it is called “Programs and Features”).
  2. If there are problems uninstalling Acrobat, such as an error such as “THE PATCH PACKAGE COULD NOT BE OPENED. Verify the patch package exists and you can access it, or contact the application vendor.” then do the following sub-routine:
    1. Download Microsoft’s Clean Up Utility.
    2. Run it to install the Clean Up program.
    3. Now run the Clean Up Utility program by clicking Start > All Programs > Windows Install Clean Up
    4. In the list of program that the utility offers fins Acrobat Reader, click once on it to select its line, then click the Remove button.
    5. Download and install Acrobat Reader from the link provided above.
    6. Once it is installed, now uninstall it in the Control Panel’s Add/Remove programs (in Windows Vista and Windows 7 it is called “Programs and Features”).
  3. Install the Acrobat program after downloading it from the link above. The program has been “reinstalled” now. This reinstallation takes care of most problems that can occur in Reader, and it’s plugin / add-on for Mozilla Firefox and Internet Explorer.

There have been some mentions of an Adobe Cleanup Tool or Adobe Uninstall Tool made to uninstall Reader manually, but these are still unavailable from the Adobe website to the public. Perhaps their technical support staff can provide the utility if a customer contacts them, as one blogger stated.

Posted under Browsers, Downloads, Freeware, Microsoft

How to fix “is not accessible. You might not have permission to use this network resource. Access is denied.” Network error with accessing XP windows shares

Trying to access a Windows XP host computer over a LAN (local area network) and get into it’s shared folders.

This little turd of an error can be really irritating. It happens when trying to access a shared folder, or any shares, on a remote, but LAN networked, Windows XP computer. After running the Network Setup Wizard on the host computer, and enabling file and printer sharing, it just won’t go away. In Windows XP Professional, you can go into the explorer view settings, and disable Simple File Sharing, which didn’t fix it either.

The fix ended up being a simple registry edit, suggested by Microsoft: http://support.microsoft.com/kb/913628

Here is the process:

To resolve this issue, set the value of the restrictanonymous registry entry to 0. To do this, follow these steps:

  1. Click Start, click Run, type regedit, and then click OK.
  2. Locate and then double-click the following registry subkey:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
  3. On the right side, double-click restrictanonymous.
  4. Make sure that the value in the Value data box is set to 0, and then click OK.
  5. Close Registry Editor.
  6. Restart the computer.

This worked like a charm more than once for me.

Posted under Microsoft, Network, WordPress

Easy Post Editing with WordPress

WordPress provides an easy method with which you can update your posts easily as you view them within your site. It is simply logging into your admin area, then viewing your site as a normal visitor. You can edit articles/posts/pages as you view them.

Heres how:
Login to your sites Admin area. This is usually something like http:///www.yoursite.com/wordpress/wp-admin.
Once logged in youll see a link at the top of the admin page that youre looking at (just following your website name) that says View Site >> . Click It.
Now youre viewing your website. Simply go view the page that you want to edit. Youll notice a link below the article that reads Edit or Edit this entry or something to that effect.
Just click thet Edit link, and youre in edit mode. Edit as usual.

Posted under WordPress

This post was written by Content Curator on October 11, 2006

Tags: , , , , , , , , , , ,