Enable SSH and basic network tools in Ubuntu

Saifudheen SidheeqLinuxLeave a Comment

install ssh and basic network utilities in ubuntu

There are few features that are not available out of the box in Ubuntu. One among such feature is SSH. If you ever install Ubuntu on your machine and expect the ssh to work by default, it doesn’t. You would get an error message that says ‘The remote system refused the connection’

he remote system refused the connection

And for me, being from the network background I really needed this ssh access also certain network tools as well, such as, traceroute, arp table and so on.

In this blog lets enable ssh and basic network tools in Ubuntu, eventually how to fix traceroute issue in Ubuntu.


  • You must have Ubuntu machine installed with root access on your machine with internet access.

How to enable ssh access on Ubuntu ?

Step 1. Login to the terminal.
If you are using Ubuntu Desktop type CTRL+ALT+T , or right click on Desktop and click on Open in Terminal

Step 2. Install Open ssh server by entering the below commands.

sudo apt update
sudo apt install openssh-server -y

Step 3. Let’s quickly check the status of ssh service that we have just installed on the machine by running the command
service ssh status.

As you can see the ssh service not only installed, it has also been started automatically.

At any point, if the ssh service has not started you can enter the command service ssh start to start the service

Step 4. You can use ssh [email protected] address to ssh into the machine from a Linux box or use any ssh client software.

As you can see this time when I try to SSH access the Ubuntu machine, it is asking for the credentials.

And I am able to login via ssh after I entered the Ubuntu machine credentials from ssh client.

Installation of Basic network utilities in Ubuntu.

Just like SSH, if you ever try to check ARP entries by typing arp -a, or checking the route table by typing netstat -rn or route -n, you get the error saying the command not found.

install arp and route -, netstat -rn utilities in ubuntu

All these utilities are included in the net tools package, let go ahead and download and install them by typing sudo apt install net-tools -y

After few seconds all the packages are installed successfully.

installation of net-tools on ubuntu

Net-tools verification in ubuntu

  • When I ran the arp -a I could see all the arp entries in the system.
check arp entries in ubuntu
  • Let me run the command route -n to see my route table
checking routes with metric in Ubuntu
  • Eventually netstat -rn to see the route table
checking routes in ubuntu

Note : By default, the ubuntu has built in tool called ip route to check the routing table instead of route -n or netstat -rn

  • IP route command would show the route differently then other utilities that we mentioned above.
checking ip route in ubuntu

Access traceroute on Ubuntu

One of the network utility that many of the network admins use in Ubuntu is the traceroute utility which would help them to see the path for a specific network.

You can install the traceroute package by running

sudo apt install inetutils-traceroute -y

Unfortunately, when you try to run the traceroute in ubuntu it would not just show the path instead it just throws some asterisk signs. Which many of the network engineers tend to believe that the network is not reachable or something is blocking the network. However that’s not the case.

traceroute not working in Ubuntu ?

The traceroute not showing the output for some reason, and there is work around for this.

Instead of using the traceroute utility I would recommend you to use MTR utility (My Traceroute ) , and it just works.

  • To run MTR, type MTR and the IP that would like to trace.
  • Below is the output for the tracroute I ran for the google DNS IP
how to use traceroute in ubuntu

And best part is MTR is installed by default in Ubuntu.