1. Before installation of telnet and ssh, do a ping test to ensure that you are able to connect to Internet from Ubuntu Server.
2. Update and refresh the latest software packages list in Ubuntu Server. This is to ensure that you will install the latest copy of Telnet Server and SSH Server.
$ sudo apt-get updateYou will see a list of connections to http://us.archive.ubuntu.com …. ended with “Reading package lists… Done”.
If you don’t have any error message, you are good to go.
3. Install Telnet Server
$ sudo apt-get install telnetdAfter this step, you should be able to telnet to your Ubuntu Server.
If for any reasons that you need to restart your telnetd services, enter the following command
$ sudo /etc/initd/openbsd-inetd restart4. Install SSH Server
$ sudo apt-get install openssh-serverAfter this step, you should be able to ssh to your Ubuntu Server.
If for any reason that you need to restart your ssh services, enter the following command
$ sudo /etc/init.d/ssh restart