Archive for the Windows Category

I have been trying to fix this error:

Could not create directory ‘/home/xxx/.ssh’.
The authenticity of host can’t be established.
Failed to add the host to the list of known hosts (/home/xxx/.ssh/known_hosts)

It is very annoying to type in Yes everytime trying to connect to a server so I decided to do some research but couldn’t find solution.

I found my solution this way:

-Create  a file in your hard drive (wherever you feel like), I have created mine under: c:\users\myusername\known_hosts (ex: c:\users\john\known_hosts)
-find ssh_config under OpenSSH\etc\ folder and add this line

UserKnownHostsFile c:/users/john/known_hosts

 After you add this line, try to connect and you won’t have to type in “Yes” anymore. If you would like to disable known_hosts file check completely, you can also change this line:
StrictHostKeyChecking yes

to

StrictHostKeyChecking no

 That will allow you avoid known_hosts from get go.

If you want to do public key authentication but you are not able to use ssh-keygen to create because you are getting:

Generating public/private rsa key pair.
Enter file in which to save the key (/home/xxx/.ssh/id_rsa):
Could not create directory ‘/home/xxx/.ssh’.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
open /home/xxx/.ssh/id_rsa failed: No such file or directory.
Saving the key failed: /home/xxx/.ssh/id_rsa.

You can run ssh-keygen uder c:\program files\openssh\bin\ folder  with this:

ssh-keygen -t rsa -f id_rsa

-f switch would allow you to add a filename. Once you create the public and private key (for this example: id_rsa and id_rsa.pub) go back to your c:\program files\openssh\etc\ssh_config file and remove # from
#IdentityFile ~/.ssh/id_rsa

and point it to your new file:

IdentityFile c:/program files/openssh/bin/id_rsa

After awhile I tried to start OpenSSH service on my laptop and I ended up getting these errors each time I tried to start the service:

Could not start the OpenSSH Server service on Local Computer. Error 1067: The process terminated unexpectedly.

I added the details of the errors I experienced.

Solution: The main problem to this issue is having multiple cygwin1.dll on your computer and have one of them on the PATH variable.

1- In order to fix this issue, you first need to find out which folders/applications might have cygwin1.dll file under it.
2- Check the PATH variable via right click on My Computer -> Properties -> Advanced System Settings -> Environment Variables
Under this section, you will find two PATH variables. First one if for the user level (your login) and the second one is for System level (for all users on that machine). You should make sure both PATH variables do not include any folder that you found in the first step.

Error 1067: The process terminated unexpectedly
Faulting application name: cygrunsrv.exe, version: 0.0.0.0, time stamp: 0×40826252
Faulting module name: ntdll.dll, version: 6.1.7600.16559, time stamp: 0x4ba9b21e
Exception code: 0xc0000005
Fault offset: 0x00055c11
Faulting process id: 0xd10
Faulting application path: C:\Program Files\OpenSSH\bin\cygrunsrv.exe
Faulting module path: C:\Windows\SYSTEM32\ntdll.dll

Windows 7 Detailed message:

Fault bucket , type 0
Event Name: APPCRASH
Response: Not available
Cab Id: 0

Problem signature:
P1: cygrunsrv.exe
P2: 0.0.0.0
P3: 40826252
P4: ntdll.dll
P5: 6.1.7600.16559
P6: 4ba9b21e
P7: c0000005
P8: 00055c11
P9:
P10:

Attached files:
C:\Windows\Temp\WER4B72.tmp.appcompat.txt
C:\Windows\Temp\WER4BA1.tmp.WERInternalMetadata.xml
C:\Windows\Temp\WER4C02.tmp.WERDataCollectionFailure.txt

These files may be available here:
C:\ProgramData\Microsoft\Windows\WER\ReportQueue\AppCrash_cygrunsrv.exe_22de35eb95b016db589883555d246a6efe89f540_cab_15c74bfe

I have been seeing tons of these Errors and Warnings in Event Viewer logs under Application section. I assumed this was a result of remote desktop connections with “printer sharing” enabled and I didn’t bother to look at around. Once I did some research about this issue, I realized the issue was related to “Windows Image Acquisition (WIA) service“. Once I stopped this service, the errors and warnings went away.

The Error / Warning Logs:

STI BrtSTI: [2010/10/22 21:28:20.778]: [00008156]: SendSkeySettingToDevice Device IpAddress Unknown []
STI BrtSTI: [2010/10/22 21:28:20.769]: [00008156]: GetDeviceIpAddress: GetAddressByName [] Error
STI BrtSTI: [2010/10/22 21:28:20.768]: [00008156]: GetAddressByName: gethostbyname[] Error[11001] 

Event Type: Warning
Event Source: Brother BrLog
Event Category: None
Event ID: 1001
Description:
STI BrtSTI: [2010/10/22 21:28:20.769]: [00008156]: GetDeviceIpAddress: GetAddressByName [] Error

Event Type: Warning
Event Source: Brother BrLog
Event Category: None
Event ID: 1002
Description:
STI BrtSTI: [2010/10/22 21:28:20.768]: [00008156]: GetAddressByName: gethostbyname[] Error[11001]

It is a very simple but very useful example. You can use UE Studio’s Regular Expressions to catch and change anything very easily.

In order to capture an IP Adress you can use this regular expression: ^([0-9]+^).^([0-9]+^).^([0-9]+^).^([0-9]+^)

Once you capture the date, you can use ^x1 ^x2 to replace the changes so for this example in order to convert A record to PTR record, you can follow this:

Find What: ^([0-9]+^).^([0-9]+^).^([0-9]+^).^([0-9]+^)
Replace With: ^3.^2.^1.in-addr.arpa ^4

This will give change this 172.22.101.10 into this 101.22.172.in-addr.arpa 10

I looked everywhere to find Exchange 2007 VHD default password but no luck. If you had downloaded Exchange 2007 with Windows 2003 and you are trying to login, you will get a screen with following inputs, fill out the way I have givenbelow:

Username: Administrator
Password:  Evaluation1
Log on to: LITWAREINC

Package details for Exchange 2007 VHD:

Microsoft Exchange Server 2007 SP1 VHD
This download comes as a pre-configured VHD. It enables you evaluate Microsoft Exchange Server 2007 SP1.