how to enable ssh in ubuntu

In most of all linux flavour like ubuntu. This blog will guide you on how to enable ssh in ubuntu.
OpenSSH is a FREE version of the SSH connectivity tools. follow the set of steps mentioned bellow

Ubuntu SSHD Installation

So lets Install ssh server and client first.

sudo apt-get install openssh-server openssh-client

Now configuration check.
Type following command to check ssh is working or not.

  ssh localhost
  ssh user@

Check the status of ssh service

sudo /etc/init.d/ssh {start|stop|reload|force-reload|restart|try-restart|status}
// if its configured as server then use service command.
sudo service ssh force-reload

Command to make sure openssh is running:

netstat -tulpn

If its not listing on default port 22. then make it 22 or you can configure it for any other port like 512. Change setting in file /etc/ssh/sshd_config and then restart ssh service.

Finally make sure your open port 22 using iptables. Type following command to list current firewall rules:

 sudo iptables -L -n
Share this nice post:

One thought on “how to enable ssh in ubuntu

Comments are closed.