Ubuntu Server - SSH configuration

Found the information on the following this link
Here follows a resume where I left out the sudo command because personally I always set a root password.

Check sshd service is running:

#> netstat -tulpln | grep -i ssh

Configure ssh port to something nonstandard

go to /etc/ssh
edit the sshd_config file (with vi for example)
Search for the keyword 'Port' which will be followed with 22 because this is the default
Change 22 to for example 512

Restart SSH deamon

#> /etc/init.d/ssh restart

Verify that the port is enabled by running netstat -tulpn | grep -i ssh again.

Firewall blocking

Verify with the following command that the port is open for connection through the firewall

#> iptables -L -n

This should give a list of all listening ports ... including as in the example 512.

If it is not in, configure it <>

Now you should configure your SSH client tool to connect to the server.

Look at this link to see how to configure PuTTY


No comments: