Friday, July 9, 2010

Remote Connect via SSH or Telnet

We can connect to a remote computer using telnet (port 23) or SSH (port 22) protocols based applications. Suppose the server running an ftp service, and the server is based on operating system ubuntu. When you install ubuntu server with default options, it will install the SSH service too, also if you want setup telnet server on ubuntu(if it is not already installed). Check it using the command telnet IP-Address/Name of the system, or if you are already on the terminal of the system running the service use the command telnet 127.0.0.1 (address for the local host). If it asks for the user id and password then is is working fine, else require new installation.

To install telnet follow the steps
  1. Install inetd super server using command sudo apt-get install netkit-inetd
  2. Install telnet using the command sudo apt-get install telnetd
  3. Restart the inetd service using command sudo /etc/init.d/inetd restart
  4. Now the server is ready and can access using the command telnet ip-address/computer-name, can test it from terminal using command telnet 127.0.0.1
  5. Now can use the terminal/command prompt as you work on your terminal itself
  6. Sometimes the telnet server will show you the available menu items that you can select to perform the tasks available(you have permission) to do, for e.g. if you telnet your modem from command prompt (for e.g. telnet 192.168.1.1), you can find a set of menu items you can select it to configure the modem
Telnet and SSH provide almost the same functionality but SSH is secure than telnet.

SSH
In most cases the ubuntu server will install the ssh server when you install ubuntu. If you want access the ssh since telnet is not secure, to access the system using ssh, you can use any ssh client programs like putty. Here is how can use putty to access the system via ssh
  1. Download putty and run it
  2. Enter the host name/computer name/ip address of the system you want connect to
  3. By default, the port address will be 22 and if you are not altered the default setting for ssh on your server leave as it is, otherwise change the port address as you set for the ssh server
  4. Then click open, if it is able to connect to the server via ssh will open the terminal and you can do anything with that server that you have permission to (or can access the programs that you have access to)

No comments:

Post a Comment