From http://joeabiraad.com/linuxunix/installing-lamp-on-ubuntu-710- linuxapachemysqlphp/100 NOTE: The following assumes that you are installing LAMP on an Ubuntu desktop. We want you to install LAMP on your Ubuntu server. This means that you are working with the command line interface only. It also means that you need to network the desktop and server together (using, e.g. NAT or local-host-only networking in VMWare and running both desktop and server on the same PC) and then you can test LAMP on the server by accessing it with Firefox from the desktop installation. This changes the examples below: http://localhost becomes http://x.x.x.x where x.x.x.x is the IP address of your server (use ifconfig command to find your server’s IP address). In order to follow the procedure below, you need to have set up networking on your server, since apt-get uses HTTP to fetch files. You will need to have DNS correctly set up, and to set up http proxy when working in the lab. Here are some quick tests: • ping 18.104.22.168 : You should get a ping reply. If not, work on the network configuration in your VM. • ping www.ibm.com : You may not get a ping reply, but does ping translate the domain name into an IP address? If it does not, you need to work on DNS setup) For help with setting up proxy for apt-get, see two articles in these notes (below). It might be helpful to use the following commands: • sudo apt-get update : To update the package list in Ubuntu • sudo aptititude search apache | more : (That is a pipe using more to paginate the output) To find the package containing apache. For more information, see the article “How to manage software on Ubuntu server” below. If you have trouble with your LAMP installation, try the following: • Have a look at the responses and comments that follow the original article (URL above) – someone else may have commented on your problem. • Do a Google search on keywords such as: tutorial apache php mysql ubuntu 8.10 Installing LAMP on Ubuntu 7.10/8.04/8.10 (Linux,Apache,MySQL,PHP) Published by Jo on November 5, 2007 in Linux/Unix, PHP, Tutorials and Ubuntu . Tags: Apache, LAMP, Linux, MySQL, PHP, Ubuntu. Lately I’ve been using ubuntu 7.10 for all my projects/daily work. As a web developer i should have LAMP on my machine and now i would guide you through installing it on yours. This guide is divided into 3 steps: installing/tesing Apache, PHP and finally MySQL. Lets start with Apache: 1. Open the terminal (we will be using it through most of my guide) from Applications > Accessories > Terminal 2. Install apache2 using apt-get by typing the following sudo apt-get install apache2 Note that you should know the root password. Now everything should be downloaded and installed automatically. To start/stop apache2 write: sudo /etc/init.d/apache2 start sudo /etc/init.d/apache2 stop Your www folder should be in: /var/www/ If everything is OK you should see an ordinary HTML page when you type: http://localhost in your firefox browser Finished with Apache ? lets conquer PHP: 1. Also in terminal write: sudo apt-get install php5 libapache2-mod-php5 or any php version you like 2. restart apache sudo /etc/init.d/apache2 restart This is it for PHP Wanna test it ? Just create an ordinary PHP page in /var/www/ and run it. Example: sudo vi /var/www/test.php and write in it: <?php echo “Hello World”; ?> Now run it by typing http://localhost/test.php in firefox… You should see your ” Hello World ” 66 % is over, lets continue to installing MySQL: 1. Again and again in terminal execute: sudo apt-get install mysql-server 2. (optional) If you are running a server you should probably bind your address by editing bind-address in /etc/mysql/my.cnf and replacing its value (127.0.0.1) by your IP address 3. set your root password (although mysql should ask you about that when installing) localhost’ = PASSWORD(’xxxxxx’); mysql> SET PASSWORD FOR ‘root’@' 4. Try running it mysql -uroot -pxxx where xxx is your password. Note: You can install PHPMyAdmin for a graphical user interface of MySQL by executing sudo apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin 5. restart apache for the last time sudo /etc/init.d/apache2 restart Congratulions your LAMP system is installed and running Happy Coding //Jo UPDATE: Due to the large number of people emailing about installing/running phpmyadmin. Do the following: sudo apt-get install phpmyadmin The phpmyadmin configuration file will be installed in: /etc/phpmyadmin Now you will have to edit the apache config file by typing sudo vi /etc/apache2/apache2.conf and include the following line: Include /etc/phpmyadmin/apache.conf Restart Apache sudo /etc/init.d/apache2 restart Another issue was making mysql run with php5 First install these packages: sudo apt-get install php5-mysql mysql-client then edit php.ini and add to it this line : ” extensions=mysql.so” if it isnt already there sudo vi /etc/php5/apache2/php.ini Restart Apache sudo /etc/init.d/apache2 restart Hope this helps From http://searchenterpriselinux.techtarget.com/tip/0,289483,sid39_gci1268555,00.html How to manage software on Ubuntu Server with "aptitude" and "apt-get" Sander van Vugt 08.17.2007 Rating: -3.50- (out of 5) If you are used to RPM-based Linux-distributions such as Red Hat and SUSE, it is quite a shock getting used to package management on Ubuntu Server. The most difficult part is the layered organization of Ubuntu package management services. Nevertheless, in many ways Ubuntu offers a much easier way to manage packages based on the Debian package format. Understanding how Ubuntu Package management works allows you to do your work as a Ubuntu Server administrator much more efficiently, and even update your ll system in one single command. In this article we' explain how it works. Ubuntu uses the same package management solutions as Debian. Package management on Ubuntu Server is based on a database that keeps track of all software packages that are installed. The most fundamental of all is the dpkg-database, which is based directly on the Debian package management utility. On top of that sits the apt database which is stored in /var/lib/apt. To manage packages in this database, you can use the "apt-get" command or the "aptitude" command. Both do more or less the same. If a graphical user ll interface is installed, the Synaptec utility can be used as well. In this article you' read how to work with these tools. Managing software repositories Apart from the database that manages packages that are installed on your server, there is also the software repository as a second fundamental component that you need for package management. These repositories are basically lists of installation sources. One such installation source is the cd that you have probably used to install Ubuntu Server. Other sources are added automatically when installing Ubuntu Server. A list of all installation sources is found in the configuration file /etc/apt/sources.list. Since these sources refer to Internet sites as well as local installation sources, they help you in keeping your server up to date. The "apt-get" command always uses this list of sources before installing new software. To make sure that the list is up to date, you have to use the "apt-get update" command. This makes sure that the indexes that your server keeps locally are updated so that they know about new software packages that have become available. Once the indexes are updated this way, you can use "apt-get upgrade" to upgrade packages on your server to their latest versions or "apt-get install package- name" which will install the most recent version of the package that you want to use. Managing packages with "aptitude" Another command that works on the same package database, is "aptitude". This is not so much a command that you would use to install or upgrade packages, but more a command that is used for package management. You would use this command, for example, to search for packages that match a given keyword, e.g.: "aptitude search xen". This displays a list of all packages that match the description xen. The command would give a result like in listing 1. Listing 1: Searching packages with "aptitude" sander@RNA:~$ aptitude search xen p ubuntu-xen-desktop - Xen software for running on servers. p ubuntu-xen-server - Xen software for running on servers. p xen-doc-2.6.16 - Linux kernel specific documentation p xen-docs-3.0 - documentation for XEN, a Virtual Mac v xen-headers v xen-headers-2.6 p xen-headers-2.6.16 - Header files related to Linux kernel p xen-headers-2.6.19-4 - Common header files for Linux 2.6.19 p xen-headers-2.6.19-4-gener - Common header files for Linux 2.6.19 p xen-headers-2.6.19-4-serve - Common header files for Linux 2.6.19 v xen-hypervisor v xen-hypervisor-3.0 p xen-hypervisor-3.0-i386 - The Xen Hypervisor for i386 p xen-hypervisor-3.0-i386-pa - The Xen Hypervisor for i386 (pae ena v xen-hypervisor-i386 v xen-hypervisor-i386-pae p xen-image-2.6.19-4-generic - Linux 2.6.19 image on PPro/Celeron/P p xen-image-2.6.19-4-server - Linux xen 2.6.19 image on x86. p xen-ioemu-3.0 - XEN administrative tools p xen-restricted-modules-2.6 - Non-free Linux 2.6.17 modules on x86 v xen-source v xen-source-2.6 p xen-source-2.6.16 - Linux kernel source for version 2.6. p xen-tools - Tools to manage debian XEN virtual s v xen-utils p xen-utils-3.0 - XEN administrative tools p xen-utils-common - XEN administrative tools - common fi p xengine - A benchmark program for the X Window p xenman - A graphical Xen management tool v xenx-doc-2.6 From the list of all these packages, you can next use the command "aptitude show" to get more information about a package. For example, use "aptitude show xen-source" to get a description of the xen-source package if it is already installed, or use "apt-get install xen- source" to install it now. t If you don'like to manage packages from the command line, there is good news. The aptitude utility can work in menu mode as well, but to do that you must make sure that the right terminal setting is used. To do this, first type export TERM=vt100. Next run ll "aptitude" again, and you' see the interface from Figure 1. From this interface you can check which packages are installed and which are not from an intuitive menu interface. GUI package management If managing packets from the console using "apt-get" or "aptitude" is not ideal for you, you might want to do it from a graphical user interface instead. One of the tools that comes with the graphical interface is the Synaptic package manager, which is based on the apt database as well. As you see in Figure 2, it offers an intuitive mouse-driven interface to help you install and manage software packages. In Synaptic, the "Sections" button is a good starting point. This button allows you to see s all available software, organized by software category. To see what' inside a category, ll click it, and in the right part of the Synaptic window you' see a list of available ll packages. After clicking an individual package, you' see a description of the package, allowing you to see exactly what is in the package. Next, select the "Mark for Installation" option and click "Apply." This will bring up the window that you see in Figure 3, asking you if you really want to install this package. From this window, click s "Apply" to start the package' installation. Another useful option from the Synaptic interface is the "Search" feature. It works very easily: Click "Search," and in the window that pops up, select the software that you are ll looking for. Click "Search" again and you' see a list with all matching packages in it. Next, mark them for installation and click "Apply" if you really want to use these packages. Summary For first time users, the Ubuntu server package management utilities are quite intimidating. The most important reason for that is that a layered architecture with related commands is used to manage software on your server. The most important system is based on the apt package database. In this article you have learned how to use the commands "apt-get" and "aptitude" to perform package management from the command ve line. You' also seen how the Synaptic package manager can make package management easier if you are using a graphical environment. From http://www.garfieldtech.com/blog/your-debian-aptitude Your Debian Aptitude ! " # $ %# &' $ $ $ %# $ # ! !! () ( ) !&*$! +$ $ # + !! ( , - $ !! $ !! %# ! ! $ !! # $ &. $ !%# ! !! !! / ! # !! !! &0 0 $ 1 ( 2 ! , -& 3 ' # $ $ !! ! $ $ ! 4 & 1 # $ $ 1$ 5$ $ # # ! 6 7 $ 2% 1 ! ! $ # $ ) &$ 1 $ ! # 8$ ! $ & ) 5 # $ ! # $ #! ( % , -& $ %# / ! ,- ( $ !& 9 $ ! ! # $ : $ ! ! # $ &; ! &< ! ,- & ( ! $ 1 ! ) &$ & 77 ' %# 1 !!& # $ 57 && !!& ' $ ! $ ! $ $ $ # $ $ 1 • 4 !! $ ! ! $ $ ! ! # & • $ - $$ ! ! $ $ ! ! # & • ! # $ # 5 7 # !! 5 ! ! ! $ $ < = > #! & 7 • ! $ < $ # # $ & • ) ! & • # $ ) $ !! $ 1 !! & • # ?! # $ $ 1 # ! !! # !! $ & • $ ( ) ,- / ! %# $ $! $ & *$ !! $ ! @ $ $ ! ! $ $ $ @) 1 $ $ #! #! $ $ + + &4 1 $ # ! %# 5 ! ! 7 apt-get pkgname apt-get install pkgname& 1 4 ! $ 4 @ $ $ 1 ! $ $ !! apt- get remove pkgname $ ! !! 1 apt-get --purge remove& 6 + , @6 ++ ( , + 6 + , ( @ $ +) 1 $ $ $$ !/ *$ + 4$ < <$ @+ - &4 !! $ $ / &$ . ) &( . !! $ $ !! $ ! &deborphan $! # 1 &$ ) $ 1 apt-cache search $ $ ! " $ 1 ! !! $ #! $& $ $ 1 $ ! 6 4 dselect& $ ! > ) # ! $ # &4 " !! " ! $ # ! ! > 6 4 ! 4 ! / 2 ? 4! 1! ! ! ! & & < $ !! $ #! $$ $ $ %# ! @)$ $ aptitude #! ! & $ + " + &9 & !! A &*$ @* !! $ ! & A !! ! ! $ & $ ! $ # ! ! 5 !! $ $ ! 7 $ < $ + <$ + • aptitude update > $ ! ! $ ! #! 5 ! & • aptitude upgrade > ! #! 5 ! & 7 • aptitude dist-upgrade > ! #! 5 ! & 7 • aptitude install pkgname 4 !! 5 ! & !!7 • aptitude remove pkgname > !! 5 ! & 7 • aptitude purge pkgname > !! ! 5 ! & 7 • aptitude search string < $ $+ + $ 5 ! $ $ & 7 • aptitude show pkgname <$ ! 5 ! $ $ & 7 • aptitude clean % ! ! ! 5 ! ! & 7 • aptitude autoclean % ! ! ! # 5 ! ! & 7 • aptitude hold pkgname A" 1 !! 5 ! # $ ! & 7 $! $ $! & &< ! 1 @4 # & 1 $ ! # ! ! $# !! $ : ! $ $; ! ! $ &4 ! $ $ $ ! !! $ $ !! #! $ $ ! $ $ $! ) &$ $ & *$ !! !! # ! $ $ $ # ! / ) &$ $ $ !! $ $ $ & - ! ) &$ !! $ $ / . $ !! $ $ ! 1 !! ! / & . 4 !! ! $ . !! # 8 ! $ # $ # &4 ! !! $ $ ! # : $ 1 $ $ # !! # & $ # ! > 6 4 ! $ ! $ $ !! # @ ! 6 4< >& ! aptitude $ ! > 6 4 ! ! 4 & 1 !! ! > 6 4 ! 5 ! " ! > 6 4 7# 1! $ $ 4 $ & $ # ! $! - &2 ! 3 )$ ! $ ! $ < 2 ( & *$! 1 #! $ ! ! "#! #! & < 1 %# $ &4 1 $ # # $ &4 1 $ # $ & $! 1 # ! % !. $ #$ ) &$ % !3 From http://opensource-openmind.blogspot.com/2007/10/using- proxy-with-debian-for-apt-getor.html ! " # $ % % # % &' ( ) *( + ), (+ - . / * 0 - * $ $ - % 1, 1$ 1# 1$ 1/ 1$ 1( 1$ 1' 1 1/ 0 1 . 2 , ) ) 3 From http://blogs.sun.com/avinashjoshi/entry/using_apt_get_behind_a Using apt-get behind a proxy (Ubuntu) It is quite difficult to use apt-get in ubuntu when you are behind a proxy. To be able to install packages behind a proxy, you need to have a few details: username: The user name with with you get through the proxy password: The password with with you get through the proxy proxyserver: The proxy server port: The port with with you connect to the proxy server (default is 80) The proxy can be set in two ways: Edit your /etc/apt/apt.conf file as root. Put these line at the end of your /etc/apt/apt.conf file : Acquire::http::Proxy "http://username:password-AT-proxyserver:port/" OR Edit your /etc/bash.bashrc file as root. Put these line at the end of your /etc/bash.bashrc file : export http_proxy=http://username:password-AT-proxyserver-DOT-net:port/ export ftp_proxy=http://username:password@proxyserver-DOT-netport/ You can omit the username:password, if your proxy server has no password. That’s all for today! Happy apt-get-ing! From http://www.howtogeek.com/howto/ubuntu/install-and-use-the-gftp-client-on-ubuntu-linux/ Install and Use the gFTP Client on Ubuntu Linux s Using ftp from the command line can get tedious after a while. There' a client for Ubuntu called gFTP that gives you a GUI based ftp experience. Much easier. To install the gftp client, open up a terminal and use the following command: sudo apt-get install gftp Once the application is installed, you can find it in Applications \ Internet \ gFTP To connect to a server, just fill in the fields, and connect. Uploading files is as simple as dragging s and dropping them. It' really a great application. To save a bookmark to the site, you can just click the Add Bookmark link s It' a really easy to use client, but also extremely powerful. You can even use it to change file permissions. From http://www.linux.com/feature/62165 Transferring files with gFTP By Chad Files on May 25, 2007 (8:00:00 AM) gFTP is a complete, easy-to-use file transfer tool for the Linux desktop. In spite of its name, gFTP can transfer files using more than standard File Transfer Protocol; it provides several features that make it more than just another FTP client. The gFTP interface comprises three main sections: from top to bottom, a tool/connection bar, file transfer windows, and progress/log area. The connection bar, as its name suggests, is where you enter connection settings. All file management and transfer initiation takes place in the transfer windows. The progress/log area contains a pane that shows the transfer status of files and a scrolling log of all the actions in the current session. When gFTP is launched, the transfer window on the left defaults to your home directory; the transfer window on the right is empty. To establish a connection with a remote host, fill in the settings in the connection bar and click the connect/disconnect button (the icon on the left of the connection bar). If the settings are correct, gFTP should connect to the host and display its filesystem in the right window. If you want to keep the host settings for future use, click Bookmarks > Add Bookmark; gFTP will add the settings, including the password if you tell it to, to its list of bookmarks. Once you are connected, transferring files is as simple as selecting the ones you want and clicking the arrows between the transfer windows. You can also transfer single directories by dragging and dropping a directory into the opposite transfer window. When a transfer has been started, gFTP will show a list of the files and their transfer progress in the progress pane. Several messages will also appear in the log explaining exactly what gFTP is doing. If you need to stop a transfer, skip a file, or reorder the files, right-click the progress pane and a list of options will appear; these options can also be found in the Transfers menu on the toolbar. gFTP can also perform file management tasks on the local and remote systems, including creating new directories, changing permissions (chmod), changing directories, renaming files and directories, and viewing and editing files. The tasks can be found in the right- click menus of the transfer windows, and in the Local and Remote toolbar menus. These menus also include tools to select and filter files. "Change Filespec" will let you define a regular expression filter that causes the transfer window to show only matching files. The rest of the tools allow you to select sets of files in the window; "Show selected" filters out all files except the selected one, "Select All" selects all of the files and directories in the respective window, "Select Files" selects all of the files in the respective window, and "Deselect All" clears the selection. Every time one of these tasks is executed, a log message is added to the log at the bottom of the window. Other transfer protocols gFTP is not just for FTP; it handles several other transfer protocols: HTTP/HTTPS (Hypertext Transfer Protocol) is the protocol that makes the Web work. gFTP allows you to connect to Web sites, browse, and download files. There are some limitations though; the gFTP HTTP transfer tools are designed for sites that utilize directory browsing. Sites that have default pages or have directory browsing disabled will appear to not have any files in the file transfer window. When using HTTP transfers, do not put http:// in front of the host address, and when connecting to a secure site you s have to manually install the server' SSL certificate (check your OpenSSL setting to find out how to do this). SSH (Secure Shell) is a protocol used to securely connect to servers over a command shell. SSH transfers are useful in environments where FTP is not trusted or not available. FSP (File Service Protocol) is a UDP (User Datagram Protocol) protocol for transferring files, and used mostly as a replacement for anonymous FTP. Options and settings gFTP has several settings and configuration options that you can access by opening the ll options dialog (FTP -> Options). In the dialog you' see several tabs: • General contains the basic settings for gFTP. Most of these settings are self- explanatory and do not need to be changed. The ones you should change are View program and Edit program, which control what program is run when you select the Edit and View options in the Local and Remote menus. gedit, the default GNOME text editor, is a good choice for both of these settings. • Network allows you to configure timeouts, retries, transfer rates, and other network-related settings. • FTP houses proxy, anonymous FTP, and transfer mode settings. Important settings on this tab include passive mode and ASCII transfer mode settings. • HTTP has proxy configuration options. • SSH allows you to set a custom program and settings to use when establishing SSH connections. • Local Hosts is where you can add custom network host and domain information. Advanced tools gFTP also has a handful of useful extra features, such as the ability to directly move files between two remote hosts. To do this, you have to connect to one host in the right-hand window, then change to the left window (FTP -> window 1 from the toolbar) and connect ve to another host. Once you' made the connections you can initiate transfers between the two hosts. As mentioned earlier, gFTP will allow you to set an editor, and it lets you send files direct to the specified application by right-clicking on them. If you save any changes to a file you edit on a remote host, gFTP will automatically upload the changes. This feature is handy for making quick changes to configuration files. Another advanced feature is the ability to compare two hosts. gFTP does this by selecting the files and folders that are different in the two transfer windows; difference is defined as exists or does not exist, not differences in individual files. gFTP also includes a command-line interface, though many distributions include the command-line version as a separate package. For the most part the command-line version functions in the same way as the standard FTP utility; notable differences include the ability to use SSH transfers and download directories recursively. The gFTP Web site provides more information about the command-line interface. gFTP also allows you to send site commands to a remote host. Site commands are FTP commands that are server-specific and not part of the FTP standard. You can send a site command by right-clicking on one of the transfer windows and selecting Send SITE Command. The same feature can also be found in the Local and Remote toolbar menus. gFTP is a Linux file transfer Swiss Army knife -- packed with features and very helpful. s It' an application that every Linux user should know about. Chad Files, a software developer and writer, has been developing software applications for more than 10 years, and is a contributing developer to many open source projects. He has used gFTP nearly every day for the last five years. From http://mylinuxnotebook.blogspot.com/2008/09/restart-gnome-panel.html Howto Restart Gnome Panel t It doesn' happen a lot but it does sometimes when the Gnome Panel freeze. If you are a former windows user you might be used to restart the computer when something in you desktop stuck. This is not the way with Linux. We can fix the problem by restarting the desktop session (restarting the X server) pressing the Ctrl+Alt+BackSpace but this will destroy everything we worked on so far. A more elegant way will be to restart only the Gnome Panel. Getting access to the Linux command line shell In order to restart the Gnome Panel we will need to execute the Linux kill command. Once the Gnome Panel process is killed Gnome will restart it automatically so the only thing left for us is to kill the Gnome Panel process. In order to execute the Linux kill command we will need to get access to the Linux shell. This can be done by one of the following: 1. Pressing Alt+F2 2. Using an opened console window using the Alt+Tab buttons to navigate to it. 3. Using a console session by pressing Ctrl+Alt+F1 Killing the Gnome Panel In each of these options we will need to execute the Linux kill command in order to kill the Gnome Panel process. There are two ways to use the kill command: 1. Using the application name will kill all the applications with the same name 2. Using the process id (pid) will kill only the process with the specified id. Back to our case with the Gnome Panel, we can use both of the options. Getting the Gnome Panel Process Id First we will need to find the process id of the Gnome Panel. We can do it by listing the running processes on the system and filtering the ones with the word panel. $ ps -ef | grep panel shimik 19301 6584 0 09:13 ? 00:00:04 gnome-panel shimik 20367 19254 0 09:35 pts/7 00:00:00 grep panel We can see that there are two processes which were started by the user shimik, the first one is the gnome- panel process with the 19301 process id and the second is the grep command which we used to filter out the processes. Restarting the Gnome Panel using the kill command Now that we know the process id of the Gnome Panel we can kill it by using the following command $ kill -9 19301 Restarting the Gnome Panel using the killall command In order to use the killall command, we need to know the Gnome Panel process name. Looking back at the process list $ ps -ef | grep gnome-panel shimik 19301 6584 0 09:13 ? 00:00:04 gnome-panel shimik 20367 19254 0 09:35 pts/7 00:00:00 grep panel We can see that the Gnome Panel process name is gnome-panel. Now we can use the killall command to kill the Gnome Panel process. $ killall gnome-panel After killing the gnome panel process gnome will restart the panels and we can continue our work without loosing the things we have done so far. Although this explanation is about Gnome Panel restart in fact it describes the ways to restart, any Linux process so you can use it whenever you need to close/terminate a process. From http://www.debianadmin.com/administer-your-ubuntu-server-remotely.html Administer Your Ubuntu Server Remotely Posted by Admin on December 20th, 2006 If you want to Administer Your Ubuntu < Remotely in secure manner for your daily tasks or some maintenance for this you need to install SSH server.SSH provides you with the ability to remotely log in to your server and run commandsall over an encrypted channel. Plus, SSH offers a number of advanced functions that can make remote administration simpler. Install SSH server in Ubuntu sudo apt-get install openssh-server This will complete the installation.the package will take care of creating the initial RSA and DSA keys you need, as well as providing you with a default SSH config. Connecting to the server Now you can connect to the server from other machines using the following command ssh serveripaddress Example ssh 22.214.171.124 Configure SSH The main configuration file located at /etc/ssh/sshd_config and the default configuration will enables remote root logins and X11 forwarding which is not good for your server .So now we will disable these two options. Disable remorte root logins For this you need to search for the following line in /etc/ssh/sshd_config file PermitRootLogin yes and chnage this to the following one PermitRootLogin no Disable X11 forwarding For this you need to search for the following line in /etc/ssh/sshd_config file X11Forwarding yes and chnage this to the following one X11Forwarding no After finishing your configuration you need to restart SSH server using the following command sudo /etc/init.d/ssh restart X11 Forwarding If you want to use X11 Forwarding option so that you can connect your remote machine using Xterm if you want to connect the X11 session you need to use the following command ssh -X serveripaddress Copy Files Securely using SCP Another common need is to be able to copy files between servers you are administering. While you could set up FTP on all of the servers, this is a less-than-ideal and potentially insecure solution. SSH includes within it the capability to copy files using the scp command. This has the added benefit of copying the files over a secure channel along with taking advantage of any key-based authentication you might have already set up. To copy a file to a remote machine use the following command scp /path/to/file @remotehost:/path/to/destination If you need to copy from the remote host to the local host, reverse the above command scp user@remotehost:/path/to/file /path/to/destination if you need to copy an entire directory full of files to a remote location, use the -r argument scp -r /path/to/directory/ user@remotehost:/path/to/destination/ If you are transferring logfiles or other highly compressible files, you might benefit from the -C argument. This turns on compression, which, while it will increase the 2 > ( during the copy, should also increase the speed in which the ! . Use the -l argument to limit how much bandwidth is used. Follow -l with the bandwidth you want to use in kilobits per second. So, to transfer a file and limit it to 256 Kbps use the following command scp -l 256 /path/to/file user@remotehost:/path/to/destination From http://www.linuxjournal.com/article/10012 Paranoid Penguin - Security Features in Ubuntu Server April 1st, 2008 by Mick Bauer in Use old-school administration skills to benefit from modern tools on Ubuntu Server. Last month, I offered a survey of security features in Ubuntu Desktop 7.10, a single-CD Linux distribution that combines the flexibility of Debian with a very easy-to-use set of graphical setup/administration tools. Ubuntu also comes in a server version, which in some ways is just a re-configuration of Ubuntu Desktop, but s nonetheless, it' a different distribution in its own right. This month, I survey some of the major security features in Ubuntu Server 7.10. Unlike Ubuntu Desktop, s Ubuntu Server is probably the wrong choice for complete Linux newcomers. It' extremely command-line- s ve centric, and its documentation is not exactly encyclopedic. Accordingly, this month' column assumes you' got a basic understanding of how Linux works and some comfort with the command prompt. Ubuntu Server vs. Desktop There are several key differences between Ubuntu Server and Ubuntu Desktop. First, and most obvious, is t the lack of any graphical tools. Ubuntu Server doesn'install the X Window System automatically. This has become an increasingly rare approach, even with server-oriented Linux distributions. But, as I explain shortly, omitting the X Window System improves system security and performance and decreases system complexity. Second, Ubuntu Server installs a much smaller set of packages overall than Ubuntu Desktop. (In fact, s there' ample room on the Ubuntu Server CD image to add things of your own—watch this column for a future series on customizing and building your own bootable CD images.) You might think this means that t Ubuntu Server offers fewer choices in server applications, but as I show here, these aren'fewer choices than on other popular server-oriented distributions. And besides, you can install additional Ubuntu packages easily over the Internet. s The last major difference worth noting is that Ubuntu Server' default kernel is tuned for server performance, s whereas Ubuntu Desktop' default kernel is tuned for maximum responsiveness. An article by Carla Schroder on these differences details some specifics as to how this is achieved (see Resources). … Text deleted … No Automatic Updates in Ubuntu Server Given the importance of patching to maintain system security, you might be surprised to learn that Ubuntu t Server doesn'have any specific mechanism for automatically downloading and installing security updates. I can explain why in two words: change control. s On a production server that does real work, it' a bad idea to apply any patches, even security updates, until ve t after you' tested them on a similar server in a lab to make sure they don'break anything. Sure, you can run the commands aptitude -y update, aptitude -y upgrade, aptitude -y dist- upgrade and aptitude -y autoclean from a cron job each night. But that -y option, which allows aptitude to run unattended, also might cause a package update to overwrite some custom configuration file with a default configuration. re On a server, you' better off running these commands manually as needed, without the -y option (after first ll doing so on a test system if you run in a change-controlled environment). That way, you' be prompted ll before any configuration files are overwritten, and you' be able to observe firsthand the changes aptitude makes to your system as they happen. Subscribe to the ubuntu-security-announce mailing list (via www.ubuntu.com/support/community/mailinglists) to receive e-mail notifications of security patches as re they' made available. From http://en.wikipedia.org/wiki/Advanced_Packaging_Tool Update, upgrade and dist-upgrade • Update is used to resynchronize the package index files from their sources. The indices of available packages are fetched from the location(s) specified in /etc/apt/sources.list. For example, when using a Debian archive, this command retrieves and scans the Packages.gz files, so that information about new and updated packages is available. An update should always be performed before an upgrade or dist-upgrade. Be aware that the overall progress meter will be incorrect as the size of the package files cannot be known in advance. • Upgrade is used to install the newest versions of all packages currently installed on the system from the sources enumerated in /etc/apt/sources.list. Packages currently installed with new versions available are retrieved and upgraded; under no circumstances are currently installed packages removed, or packages not already installed retrieved and installed. New versions of currently installed packages that cannot be upgraded without changing the install status of another package will be left at their current version. An update must be performed first so that apt-get knows that new versions of packages are available. • dist-upgrade, in addition to performing the function of upgrade, also intelligently handles changing dependencies with new versions of packages; apt-get has a "smart" conflict resolution system, and it will attempt to upgrade the most important packages at the expense of less important ones if necessary. The /etc/apt/sources.list file contains a list of locations from which to retrieve desired package files.