Archive Page 2

Secure shell (ssh) session timeout

I’ve noticed that when I keep ssh sessions that I opened before untouched for some period of time (like 30 minutes) they become frozen and as a result I have to close ssh terminal and start a new connection. To prevent such situation I found several tips:

1) Start some utility updating the screen before leaving ssh session untouched. I usually use watch -n 1 ‘date’ that shows current date every second. Other simple way is to send icmp requests to some host, e.g. ping google.com.

2) Increase ssh session idle time by

echo “7200” > /proc/sys/net/ipv4/tcp_keepalive_time

I’ve checked these tips with Fedora Core, CentOS, Debian and Ubuntu but I’m completely sure that it applicable also for other Linux distributions. First tip (ping) can be used in Unix also.

 

Advertisements

Switching from Windows to Linux help resource

Here is a nice web site that may be useful for users who are going to switch to Linux from Windows.

applications.jpg

Silent and unattended large file download with wget

If you would like to download large file like HD Video or Linux ISO image while you’re working at your Linux PC or laptop I recommend to use the following command:

wget -c -b “http://file/you/wish/to/download.ext” –limit-rate=100k

Where, -c will continue getting partially-downloaded file (if connection was dropped or smth else), -b will put wget downloading into background, –limit-rate=100k will limit downloading speed at 100 KBytes per second (KB/s).

P.S. man wget still works 🙂

Can’t find usable shell script encryption solution…

It sounds a bit cheesy but I can’t find any usable solution on how to encrypt Linux/Unix shell script in order to protect it’s source code when it’s still executable.

There was a post here about how to protect shell scripts, but I found SHC bug. Just run script that is encrypted with shc and execute command ps ax and you’ll see full source code at ps‘s output (newline characters will be replaced with “?” symbol). Because of this fact I can’t use SHC anymore and looking for alternative solution.

It would be very appreciated if you suggest a way how to solve the issue. THANK YOU, mates.

Feed spamassassin with spam or ham

The easiest way to feed spamassassin with spam is:

spamassassin -r < message.txt

Continue reading ‘Feed spamassassin with spam or ham’

Vmware Server at Ubuntu Feisty 7.04

This step-by-step manual provides instructions on how to install freely available VMWare Server at Ubuntu Feisty Fawn Linux (7.04).

First of all download installation package here and get free serial code. To get VMWare Server working at Ubuntu 7.04 I recommend to download this patch.

To make sure there are all necessary tools installed to get VMWare Server running, execute:
sudo aptitude install linux-headers-`uname -r` build-essentia xinetd

After it’s done unpack installation package and patch:
tar -xvzf VMware-server-1.0.3-44356.tar.gz
tar -xvzf vmware-any-any-update109.tar.gz

Then:
cd vmware-server-distrib
./vmware-install.pl

Choose defaults to questions until installer asks to run vmware-config.pl. Press no and install patch:
cd ../
cd vmware-any-any-update109
sudo ./runme.pl

Now it’s proper time to configure VMWare Server:
sudo vmware-config.pl

Just choose default values (it really worked for me).

When the installation is done, run
vmware

and proceed with using VMWare Server:

screenshot-viper-laptop-vmwareserverconsole.png

One more way to count CPUs in Linux

Here is one more way to find out how many CPUs are used by Linux:
cat /proc/cpuinfo | grep “^vendor_id” | wc -l

As for me I use this way to make sure that SMP kernel should be installed.

You’re welcome to suggest your ways of doing the same in comments. Thank you in advance!


Archive