Restrict ssh access to the server is a must because it involves security issues. Now I will share how to limit ssh into our server. Let's assume our server is a server D
1. Changing the ssh port for only us who know the server D
2. Prohibiting root login via ssh for security
3. Restrict ip addresses which can do ssh to the server D
To do the numbers 1 and 2 we can do it by editing the files in sshd_config.
To change the ssh port, change the number 22 to another number in the Port parameter 22. 22 is the default port for ssh service, and therefore replace it with another number such as 40
Port 40
To disallow root login, change the following parameter from NO to YES
PermitRootLogin yes
To limit the IP addresses that may access the server D then we should use / etc / host.allow and / etc / host.deny
in / etc / hosts.allow we must enter the ip address that are allowed to remotely
# pico / etc / hosts.allow
and enter the following parameters
sshd: 192.168.13.0/24 # # # if we want to allow network 192.168.13.0 to our server remotely via ssh D
if it is finished, save and edit the file / etc / host.deny
# pico / etc / hosts.deny
then edit and enter the following parameters
sshd: ALL # # # This will refuse all connections other than that you enter in / etc / hosts.allow
then save and exit
after that please restart your ssh sevice for configuration number 1 and 2 runs
07 June 2011
06 May 2011
Screen : shell command for making daemon process in Linux
Those who like to use terminal in Linux, usually already know how to make a process into a daemon. Some of us usually using the characters '&' after the command. Anyway that way has as weaknesess. The weaknesses of the daemon by using the character is the difficulty in monitoring the log process or see the current process. Sometime we must create a program to produce a log file. It will be simple if the program is mad by your self, but if not? You will get dificulties and takes long time.
For that I now prefer to use a screen, a small program that really helped me. The way is simple, just type "screen", you will move to shadow of the console and press the space bar. In the new console you can type various another Linux commands. So, how do I return to the old terminal. Quite simple as well, press Ctrl A and D. Remember Ctrl A and D at the same time. Do not only press Ctrl D alone because Ctrl + D means that you turn off the screen of the terminal. If we have exit the screen, we can see a list of screen that we created with the command bellow :
screen-list
There are screens on:
28694.pts-0.test (03/05/11 11:28:02) (detached)
28479.pts-0.test (03/05/11 11:26:31) (detached)
26057.pts-4.test (02/05/11 14:34:46) (detached)
If we want to return to the screen that we just created can we type the command bellow
screen-r numberscreen
example:
screen-r 28694
so from now on you can make the process as much as possible with the "screen" command.
For that I now prefer to use a screen, a small program that really helped me. The way is simple, just type "screen", you will move to shadow of the console and press the space bar. In the new console you can type various another Linux commands. So, how do I return to the old terminal. Quite simple as well, press Ctrl A and D. Remember Ctrl A and D at the same time. Do not only press Ctrl D alone because Ctrl + D means that you turn off the screen of the terminal. If we have exit the screen, we can see a list of screen that we created with the command bellow :
screen-list
There are screens on:
28694.pts-0.test (03/05/11 11:28:02) (detached)
28479.pts-0.test (03/05/11 11:26:31) (detached)
26057.pts-4.test (02/05/11 14:34:46) (detached)
If we want to return to the screen that we just created can we type the command bellow
screen-r numberscreen
example:
screen-r 28694
so from now on you can make the process as much as possible with the "screen" command.
02 April 2011
Clonezilla : a Linux based software to duplicate hard disk
Last week I tried Clonezilla. I actually already know about Clonezilla few years ago, but have not had time to use it. I tried to make a duplicate of my laptop hard disk and the result is very satisfactory. All contents of the hard disk, MBR, and also boot loader are copied without being left behind.
Clonezilla is a software to copy the entire contents of your hard disk or just partition the hard disk to another hard disk. It also able to copy into an image. Clonezilla will copy all clusters and sectors from hard disk to another hardisk destination. If copied into the image, it will be bundled into an image file. Clonezilla is build based on Linux and is still a family with debian and ubuntu. To duplicate the contents of your hard disk you can use network booting or just use a USB media (such as external hard disk), IDE or SATA. The inmportance requirement is only media that are copied and the media to be copied must be equal or greater capacity.
If you copy the entire contents of your hard disk, then Clonezilla will copy the contents of the MBR and bootloader. So it can be used as as hot-swap hard disk. Which is as a hard disk or backup to your hard disk pc / laptop. If someday your hard disk laptop / pc get problems, then just swap the problem hard disk with the duplicate hard disk. There is no need to install the OS or other drivers.
Clonezilla is a software to copy the entire contents of your hard disk or just partition the hard disk to another hard disk. It also able to copy into an image. Clonezilla will copy all clusters and sectors from hard disk to another hardisk destination. If copied into the image, it will be bundled into an image file. Clonezilla is build based on Linux and is still a family with debian and ubuntu. To duplicate the contents of your hard disk you can use network booting or just use a USB media (such as external hard disk), IDE or SATA. The inmportance requirement is only media that are copied and the media to be copied must be equal or greater capacity.
If you copy the entire contents of your hard disk, then Clonezilla will copy the contents of the MBR and bootloader. So it can be used as as hot-swap hard disk. Which is as a hard disk or backup to your hard disk pc / laptop. If someday your hard disk laptop / pc get problems, then just swap the problem hard disk with the duplicate hard disk. There is no need to install the OS or other drivers.
24 March 2011
Create Wallpaper slideshow in Linux
Wallpaper slideshow is one of the interesting features in the GNOME Desktop. We can enjoy the turn of the desktop within a certain timeframe. By default, Ubuntu has wallpaper slideshow with titles cosmos. Try it.
Now I will teach you how to make wallpaper slideshow manually, although it could just use a wallpaper slideshow application, which unfortunately is not my concern.
Well, prepare a few images as wallpaper and place it in a folder, for example, I put it in the folder / home / alinuxnews / Pictures / slidepaper of contents:
- 1.png
- 2.svg
- 3.jpg
- 4.jpg
- 5.jpg
- Slidepaper.xml
Let's open the file slidepaper.xml or you can open gedit, click new and save with slidepaper.xml name in the folder.
Copas my own code and modification of files / usr/share/background/cosmos/background-1.xml
Contents:
Then edit the file / home/alinuxnews/.gnome2/backgrounds.xml
If no, copy it from / usr / share / gnome-background-properties / backgrounds.xml
If at me for wearing my mint copy of linuxmint.xml 8 in the same folder.
Add the following lines before the last line:
Well, now look at the Preferences tab Appeareance Backgrounds (Right click on desktop> Change Desktop Background). Click to activate
Now I will teach you how to make wallpaper slideshow manually, although it could just use a wallpaper slideshow application, which unfortunately is not my concern.
Well, prepare a few images as wallpaper and place it in a folder, for example, I put it in the folder / home / alinuxnews / Pictures / slidepaper of contents:
- 1.png
- 2.svg
- 3.jpg
- 4.jpg
- 5.jpg
- Slidepaper.xml
Let's open the file slidepaper.xml or you can open gedit, click new and save with slidepaper.xml name in the folder.
Copas my own code and modification of files / usr/share/background/cosmos/background-1.xml
Contents:
<background>
<starttime>
<year> 2011 </ year>
<month> 01 </ month>
<day> 01 </ day>
<hour> 00 </ hour>
<minute> 00 </ minute>
<second> 00 </ second>
</ Starttime>
<! - This animation will from the start at midnight. ->
<static>
<duration> 1795.0 </ duration>
<file> / home/alinuxnews/Pictures/slidepaper/1.png </ file>
</ Static>
<transition>
<duration> 5.0 </ duration>
<from> / home/alinuxnews/Pictures/slidepaper/1.png </ from>
<to> / home/alinuxnews/Pictures/slidepaper/2.svg </ to>
</ Transition>
<static>
<duration> 1795.0 </ duration>
<file> / home/alinuxnews/Pictures/slidepaper/2.svg </ file>
</ Static>
<transition>
<duration> 5.0 </ duration>
<from> / home/alinuxnews/Pictures/slidepaper/2.svg </ from>
<to> / home/alinuxnews/Pictures/slidepaper/3.jpg </ to>
</ Transition>
<static>
<duration> 1795.0 </ duration>
<file> / home/alinuxnews/Pictures/slidepaper/3.jpg </ file>
</ Static>
<transition>
<duration> 5.0 </ duration>
<from> / home/alinuxnews/Pictures/slidepaper/3.jpg </ from>
<to> / home/alinuxnews/Pictures/slidepaper/4.jpg </ to>
</ Transition>
<static>
<duration> 1795.0 </ duration>
<file> / home/alinuxnews/Pictures/slidepaper/4.jpg </ file>
</ Static>
<transition>
<duration> 5.0 </ duration>
<from> / home/alinuxnews/Pictures/slidepaper/4.jpg </ from>
<to> / home/alinuxnews/Pictures/slidepaper/5.jpg </ to>
</ Transition>
<static>
<duration> 1795.0 </ duration>
<file> / home/alinuxnews/Pictures/slidepaper/5.jpg </ file>
</ Static>
<transition>
<duration> 5.0 </ duration>
<from> / home/alinuxnews/Pictures/slidepaper/5.jpg </ from>
<to> / home/alinuxnews/Pictures/slidepaper/1.png </ to>
</ Transition>
</ Background>
Then edit the file / home/alinuxnews/.gnome2/backgrounds.xml
If no, copy it from / usr / share / gnome-background-properties / backgrounds.xml
If at me for wearing my mint copy of linuxmint.xml 8 in the same folder.
Add the following lines before the last line:
<wallpaper deleted="false">
<name> SlidePaper </ name>
<filename> / home / alinuxnews / Pictures / slidepaper / slidepaper.xml </ filename>
<options> zoom </ options>
<shade_type> solid </ shade_type>
<pcolor> # 000000000000 </ pcolor>
<scolor> # 000000000000 </ scolor>
</ Wallpaper>
Well, now look at the Preferences tab Appeareance Backgrounds (Right click on desktop> Change Desktop Background). Click to activate
23 March 2011
Free in linux Means Freedom
Have you ever heard a statement saying that Linux is free? I'm sure, all computer users, better yet, is being, will be or have been using Linux must have heard this kind of statement.
Is it true that Linux is free??? The answer is NO. It's not about Free. it's FREEDOM
Linux is free, that words is a statements that we often hear. Free if interpreted into another language turns out to have two meanings, which is freedom and free. Freedom and free distinctly different meaning. In fact, Richard Stallman - founder of the Free Software Foundation (FSF), in his book Free as in FREEDOM - Linux is more linked with the word freedom or independent, rather than free. The term free is more widely used to introduce Linux rather than the word freedom or independent. Because in fact it is easier to offer something for free rather than getting someone to fight to break away from the comfort of an already binding and membelenggunya for decades.
Is it true that Linux is free??? The answer is NO. It's not about Free. it's FREEDOM
Linux is free, that words is a statements that we often hear. Free if interpreted into another language turns out to have two meanings, which is freedom and free. Freedom and free distinctly different meaning. In fact, Richard Stallman - founder of the Free Software Foundation (FSF), in his book Free as in FREEDOM - Linux is more linked with the word freedom or independent, rather than free. The term free is more widely used to introduce Linux rather than the word freedom or independent. Because in fact it is easier to offer something for free rather than getting someone to fight to break away from the comfort of an already binding and membelenggunya for decades.
19 March 2011
Why many people are reluctant to use Linux?
Why many people are reluctant to use Linux? There are so many causes and reason like Linux is hard, too much text-based commands, the GUI display of his less attractive, and many other reasons that sometimes do not make sense.
Believe me, if you already know Linux, there would be infatuated with Linux. In addition to free, Linux has a lot of hidden potential that we can explore further. If not, why Google behind Stand up for running Linux in its Android product.
Well, make that are still hesitant and not sure what the hell is Linux capabilities is a safe way to try it, namely with the Linux Live CD distro. Distro Live CD does not need to be installed on the computer. Simply insert the CD that contains these distributions on a CD ROM drive, then restart the computer. Thus you do not have to worry if other operating systems that already exist on the computer will be lost.
You are interested to try it out? There are some decent distro you are trying, among other things:
Just try some of distro Live CD and you will interested :)
Believe me, if you already know Linux, there would be infatuated with Linux. In addition to free, Linux has a lot of hidden potential that we can explore further. If not, why Google behind Stand up for running Linux in its Android product.
Well, make that are still hesitant and not sure what the hell is Linux capabilities is a safe way to try it, namely with the Linux Live CD distro. Distro Live CD does not need to be installed on the computer. Simply insert the CD that contains these distributions on a CD ROM drive, then restart the computer. Thus you do not have to worry if other operating systems that already exist on the computer will be lost.
You are interested to try it out? There are some decent distro you are trying, among other things:
- Ubuntu
- Knoppix
- OpenSuSE
- Fedora
- Dreamlinux
Just try some of distro Live CD and you will interested :)
13 March 2011
QEMU - advanced cross-platform virtual machine emulator
QEMU virtual machine emulator is an advanced cross-platform. I say this because if you've installed QEMU on your system, you will not find anything other than a simple command line interface that can be run locally or remotely. In other words, you can build your own graphical interface to run QEMU. You can use a shell script, a GTK-based interface is complex or Qt, or if you prefer, you can build your own web-based interface using PHP, Python, Ruby or Perl. I mean it really is yours.
Another thing why choose QEMU is a factor dependencies. If you Slackware users, then you do not need anything else to install QEMU on your system. Just download the tarball it, compile, install and you're ready. Just remember one thing in building QEMU, you should run your Slackware init 1 or init 3 (text mode / non-graphic mode) for compiling QEMU is a process that is in desperate need of resources. In my system when I build QEMU on init 4 (graphics mode), the development process always stop after a few minutes because the compiler runs out of memory.
Before you proceed, I suggest you to enable virtualization support on the CPU through the BIOS. Then do not forget to load the KVM module and the AIO in the kernel
Another thing why choose QEMU is a factor dependencies. If you Slackware users, then you do not need anything else to install QEMU on your system. Just download the tarball it, compile, install and you're ready. Just remember one thing in building QEMU, you should run your Slackware init 1 or init 3 (text mode / non-graphic mode) for compiling QEMU is a process that is in desperate need of resources. In my system when I build QEMU on init 4 (graphics mode), the development process always stop after a few minutes because the compiler runs out of memory.
Before you proceed, I suggest you to enable virtualization support on the CPU through the BIOS. Then do not forget to load the KVM module and the AIO in the kernel
09 March 2011
Enable SSH server in Linux Mint
Because it functioned as a desktop, LinuxMint by default does not enable SSH server. I want to activate it because it often uses SSH for the connection and data transfer via scp command.
Here is how to enable OpenSSH server on LinuxMint:
Because LinuxMint based on Ubuntu, OpenSSH server installation command can also be done via the console / terminal with the command:
apt-get install openssh-server
For access security, such as changing the default SSH port from port 22 to another port can be done by making changes to the configuration file contained in the file / etc / ssh / sshd_config.
After making changes, do not forget to restart the OpenSSH Server service:
/etc/init.d/ssh restart
Here is how to enable OpenSSH server on LinuxMint:
- Open the main menu, select the Software Manager
- Openssh Type in the search box
- Click on the package openssh-server, then select install.
- Finish install, enable ssh with the command: / etc / init.d / ssh start
Because LinuxMint based on Ubuntu, OpenSSH server installation command can also be done via the console / terminal with the command:
apt-get install openssh-server
For access security, such as changing the default SSH port from port 22 to another port can be done by making changes to the configuration file contained in the file / etc / ssh / sshd_config.
After making changes, do not forget to restart the OpenSSH Server service:
/etc/init.d/ssh restart
Subscribe to:
Comments (Atom)