Changes

Jump to: navigation, search

Configuring Ubuntu Linux Remote Access using SSH

4 bytes removed, 18:47, 3 July 2007
no edit summary
SSH is a TCP/IP service that provides a secure mechamism mechanism for remotely logging into one system over either a local network or the internet into another system. SSH also provides the ability to transfer files between remote systems. When a user logs into a remote system using SSH, they receive a command prompt allowing them to enter commands on the remote system as if they were sitting at the remote system and had opened a terminal session.
In this chapoter chapter we will cover the steps necessary to configure an Ubuntu Linuux Linux system to accept SSH connections. This involves installing the SSH server on the local systems and configuring the firewall to allow SSH connections.
== Installing SSH on an Ubuntu Linux System ==
In order for a system to accept SSH connections the system must first be running the SSH server. By default, Ubuntu Linux does not install the SSH server so the first step is to ensure that the server is installed. This can be performed using either the Synaptic Package Manager or the apt-get command-line tool.
To install using using the Synaptic Package Manager, select the ''System'' desktop menu and then click on ''Synaptic Package Manager'' in the ''Administration'' sub-menu. Enter your password when prompted to do so. Click on the Search button in the toolbar and search for ''openssh-server''. After the search completes, you will see ''openssh-server'' in the package list. Simply click on the check box next to this item and follow the instructions to install the SSH server package. Whne When you are ready to initiate the installation , click the ''Apply'' button in the Synaptic toolbar.
To install from the command line, begin by opening a terminal window by selecting the Applications menu and selecting Konsole from the System Tools menu. In the terminal window enter the following command and press enter to execute it:
[[Image:ubuntu_lokkit_firewall_main.jpg]]
Use the Tab key to move the ''Customize'' button and press ''Enter''. On the Customize screen Tab to the SSH entry and press space so that an asterisk (*) appears nextr next to the setting to show it is enabled. The screen should now appear as follows:
[[Image:ubuntu_linux_lokkit_ssh_enabled.jpg]]
== Using SSH on Ubuntu Linux ==
SSH can be used to log into your system from a remote system. It is also possible to test that the SSH server is runnign running and accessible from the local machine. SSH connections are established using the ''ssh'' client utility.
To connect from your local machine back to itself use the following command:
</pre>
Where ''username is the name of the user you wish to log in as and ''ipaddress'' is the IP address of your system. You can also substitute the hostname of the system in place of the IP address. If you do not know the IP address run the ''ipconfig'' command in a termianl terminal window. This will output information similar to:
<pre>
In the above output the IP address is shown as ''inet addr:'', in this case 192.168.2.21.
To connect from a remote system perform the same steps above using either the IP address or host name of the remote host to which you connect. Enter you your password when prompted and you will find yourself logged into the remote system.
== Copying files using SSH ==
The SSH service provides a mechanism for copying files to and from a remote system. Copying is performed using the ''scp'' utility. To copy a file to a directory on a remote system , execute the following command:
<pre>
== Disabling the SSH Server ==
Having configured the system to run the SSH server we can now look at how to disable it. As we mentions previously the SSH server runs in the background as a service. In order to diable disable SSH we need to turn off the SSH serivceservice. This can be achieved using the ''Services'' tool. To launch the services tool click on the desktop ''System'' menu and select ''Services'' from the ''Administration'' sub-menu. Enter your password when prompted to do so. The Services tool will appear containing a list of all available services. Scroll down to find the ''Remote shell server'' entry as shown below:
[[Image:ubuntu_linux_services_ssh.jpg]]
Uncheck the box next to the SSH entry and click on the ''Close'' button. The SSH server is now disabled. To re-enable the server , repeat the above steps and check the box next to ''Remote shell server'' to enable the service.

Navigation menu