Posted by Daniel | Posted in Operating Systems, Software | Posted on October 2, 2011
0
If you have run in to an error similar to this one while setting up SSH key-based authentication in your /var/log/secure log file:
1
2
| Oct 2 21:12:05 phptest sshd[31998]: error: buffer_get_ret: trying to get more bytes 4 than in buffer 0
Oct 2 21:12:05 phptest sshd[31998]: fatal: buffer_get_int: buffer error |
Check to make sure your public key in ~/.ssh/authorized_keys or ~/.ssh/authorized_keys2 is on one line. The prefix “ssh-rsa” followed by a space and then your key should all be on one line. You may also have a comment after that describing the key on another line, but the whole prefix and key have to be on the same line or you will get an error similar to the above in your /var/log/secure log file. I see people running in to this problem frequently when copying a public key out of PuttyGen, which only has “ssh-rsa” on the first line of the output key.
Posted by Daniel | Posted in Operating Systems, Software | Posted on July 5, 2010
0
If you have been unfortunate enough to run into this issue, here are a few things you can try to resolve it. These are for Windows 7 only – there are already solutions available for older versions of Windows if you search. You need a physical copy of the DVD to do a manual restore of the files.
- (Re)start the Windows Installer service
- Right-click on Computer
- Click Manage
- Expand Services and Applications
- Select Services
- Scroll down to “Windows Installer”
- Right-click or double-click on it and make sure it is started and NOT disabled
- Run “sfc /scannow” from a command prompt as Administrator
- Should see something like: windows resource protection found some corrupt files but was unable to fix them
- Check the log to see if the problem is a corrupt file such as “msi.dll”
- Do this by searching for “cannot repair”
- If that is the case you can restore this file from the Windows DVD by:
- Insert the Windows DVD in the drive, cancel the autorun if it pops up
- Open 7-zip and browse to “install.wim” in the DVD:\Sources folder (open it)
- Inside you will find numbered folders corresponding to the windows version, open yours:
1=Home Basic
2=Home Premium
3=Professional
4=Ultimate
- Browse to the folder for the version you have installed, and you can copy/extract the file(s) you need. In my case I needed “msi.dll” in the #\Windows\System32 folder
- Note that if you are restoring a sensitive file such as this that you have to take ownership of the original file to rename/remove it before you can restore this file from the DVD, and ideally set the restored file back to the original owner and permission.
- Also note that the “msi.dll” file is owned by “TrustedInstaller”, so if you are getting a security error you need to take ownership of the file to replace it and then restore TrustedInstaller as the owner. If you can’t find it when you “check” the name use “NT SERVICE\TrustedInstaller”
- Restore an earlier restore point(not verified to work but try it..)
- Run the repair option from the installer DVD
- Reinstall Windows
Hope this helps someone. 