February 7, 2011

Permissions for .ssh

In order to make public key authentication work, the permissions for '.ssh' must _not_ give writing rights to group or others, i.e. be at least like this: drwxr-xr-x

November 27, 2010

Keep ssh connections alive

Add the follwoing lines to ".ssh/config" in order to have a keep-alive message sent every 300 s, with a maximum of 300 messages:
ServerAliveInterval 300
ServerAliveCountMax 300

August 20, 2010

Location of chkdsk results

The results of chkdsk on Windows (at least when running on Windows XP) can be seen through Control Panel > Administrative Tools > Event Viewer > Applications. The entry has the Source field equal to "Winlogon".

April 14, 2010

How to restrict Windows memory usage

In order to restrict the memory that Windows can use, starting from Vista you can use the command bcdedit (run from a Command Prompt with Administrator privileges):

* To remove 1GB (1024 MB) of physical memory from what can be used by Windows:
bcdedit /set removememory 1024

* To view the curent settings:
bcdedit /enum

* To remove the settings:
bcdedit /deletevalue removememory

ALTERNATIVELY, BUT NOT RECOMMENDED:
 
* To set the physical address limit at 1GB:
bcdedit /set truncatememory 1073741824
OR (in hexadecimal)
bcdedit /set truncatememory 0x40000000

* To remove the settings:
bcdedit /deletevalue truncatememory

April 13, 2010

How to display Linux configuration files

In order to display configuration files on Linux without the clutter of comments, an easy way is to use the following command:
grep -v "^#" /etc/YOUR_CONFIGURATION_FILE