Remote administration ubuntu linux server

Remote administration with SSH

  • Ubuntu ships with an open source implementation of the SSH standard, called OpenSSH.
  • Using OpenSSH, you may securely control a remote computer, and transfer files.
  • For this, we must install the sshd component on the server if not already installed.

Install sshd

sudo apt-get install openssh-server

Install the client component:

Some OS's, like Mac OS X, come with an SSH client build-in. In Windows, use Putty. For Linux use the following command

sudo apt-get install openssh-client

Connect with SSH


w3r:~ psr$ ssh [email protected]

Authenticate the client using its public key

To avoid providing it with a password every time you connect, you may authenticate the client using its public key;

Create the client's public key if one doesn't exist already:

ssh-keygen -t dsa

This creates your key pair and stores it in ~/.ssh/.

Preparing client

Open the file "~/.ssh/id_dsa.pub", copy contents if the file on the client, and paste it in the file "~/.ssh/authorized_keys" on the server. If later one does not exist, you have to create it. You can view the contents of the file with following command:

$ cat authorized_keys
HEHlu+U8GWd36E6AjjUzlcfreym5IRDv [email protected]

Connecting without password

Connect just like before, there should be no request for your password:

w3r:~ psr$ ssh [email protected]

Previous: Installation Ubuntu Server
Next: Upgrade Ubuntu Linux server with do-release-upgrade

Follow us on Facebook and Twitter for latest update.