Ubuntu OpenSSH Server

Posted by dyna on April 24, 2007

Rebuilding one of my server machines that also acts as a server where I work today, I jumped over to the newly released Ubuntu 7.04 on the virtue that I didn’t have a DVD drive around and the task of switching CD’s for also the newly released CentOS 5 seemed “daunting”.

One of the first things that’s different is no SSH server by default. This however is easily remedied on Ubuntu and all you need to do is follow the following steps to have SSH access to your brand new Ubuntu/Debian server.

# sudo -s
# apt-get install openssh-server

This will install the actual server and create the basic configuration files. You’re close to being done!

I don’t like to leave SSH on the default port, or allow root logins, instead relying on sudo from local accounts, so:

# vi /etc/ssh/sshd_config

Change the port variable to some number >1024, for example ‘Port 12345′.
Change the PermitRootLogin variable to no, for example ‘PermitRootLogin no’.

Now just restart the SSH server to read in the new config.

# /etc/init.d/ssh restart

You should now be able to connect to your server with any SSH client on the specified port and login using any of the local users available on the machine.

Trackbacks

Use this link to trackback from your own site.

Comments

Leave a response

  1. psychicchatonline Sun, 17 Aug 2008 04:35:07 UTC

    psychicchatonline…

Comments