Did You Know? that you can combine watch and date commands to display a simple digital clock on your terminal? For example: $ watch -n 1 --no-title date - will execute a date command every second.
One solution to this problem is to add a correct key for a particular server manually. If you feel 100% that this warring can be ingnored simply remove a line ...
Installing this plugin on any Linux system should be a easy task. First download google-talkplugin_current_i386.deb package. On a Ubuntu system use:
sudo dpkg -i google-talkplugin_current_i386.deb
on a system where sudo is ...
Here is a small script on how to login to a .htaccess protected page. Suppose that URL we want to login to is:
http(:)//www(.)example(.)com/
and here are credentials required to login:
username: www
password: ...
A following perl script and regular expression extracts all email addresses from an given text file. Sample text:
This perl script extracts all email addresses
from an given text file. This email ...
Credit card numbers contain four groups of numbers where each group contains 4 numbers. The following regular expression ( regexp ) will accept all credit card number in this format: ...
Simple way to validate US postal codes using regular expression and optionally bash. US postall codes accept five digit ZIP number + optional 4 digit code. For example 32344-4444 and ...
Are you unable to create uppercase directory name on your storage device mounted as vfat file system. The reason for this behavior is that vfat filesystem is by default mounted ...
Here are couple ways on how to change your sshd default configuration settings to make ssh daemon more secure / restrictive and thus protecting your server from unwanted intruders.
NOTE:
Everytime you ...
SSH Port Forwarding allows us to create a very simple "VPN" which lets you to secure insecure protocols such us telnet or ftp. When creating encrypted ssh connections a client needs to be connected to a ssh server on a remote host, thus creating a ssh tunnel via which an insecure information will travel. In this scenario, we are going to use ssh port forwarding to create an encrypted tunnel for telnet connection.
Enable telnet server on remote host
Let us first confirm that the telnet server is running on a remote host:
$ netstat -ant | grep 23
Create ssh tunnel to remote host
In this example you will open port 4500 on your local host and tunnel it to the port 23 on your remote host. You do not have to do this as a root. Since we are using a port higher than 1024 a ordinary user is able to create this port forward connection. Keep in mind that a tunnel is erected only when the ssh connection is running.
# ssh -L 4500:127.0.0.1:23 linuxconfig.org
At this point, every connection which uses port 4500 on the localhost will be redirected to remote port 23.
Telnet to remote host via ssh port forwarding
Before we attempt to telnet to a remote host via tunnel, we need to ensure that the tunnel is still running:
# netstat -ant | grep 4500
Once we know that the tunnel is still running we can attempt to telnet on local port 4500.
This bash script tutorial assumes no previous knowledge of bash scripting.As you will soon discover in this quick comprehensive bash scripting guide, learning the bash shell scripting is very easy task.
Lets begin this bash scripting tutorial with a simple "Hello World" script. Let's start with Learning the bash Shell: Unix Shell Programming
First you need to find out where is your bash interpreter located. Enter the following into your command line:
$ which bash
Open up you favorite text editor and a create file called hello_world.sh. Insert the following lines to a file:
NOTE:Every bash shell script in this tutorial starts with shebang:"#!" which is not read as a comment. First line is also a place where you put your interpreter which is in this case: /bin/bash.
Here is our first bash shell script example:
#!/bin/bash # declare STRING variable STRING="Hello World" #print variable on a screen echo $STRING
Navigate to a directory where your hello_world.sh is located and make the file executable:
$ chmod +x hello_world.sh
Now you are ready to execute your first bash script:
In this Linux config we are going to create encrypted partition for user "linuxconfig" and use pam_mount to mount it under /home/linuxconfig directory. For this config we have used Debian Linux, however the very same principle for creating encrypted partitions can be applied also for any other Linux distributions such as SuSe, RedHat, Gentoo, Ubuntu.
Prerequisites
First and the most important one is to make sure that on partition on which you are going to encrypt, is empty. If you have some important data there move them NOW to some save place. When creating encrypted partition all data will be removed. Secondly we need to satisfied software prerequisite so you need to install packages for: