Enable SSH

The Scenario:

You’ve installed a new Linux server, now you want to SSH to it (even if the only reason is so that you can easily copy and paste commands rather than type everything at least three times as you realise your fingers are far better at moving a mouse than accurately taping keys)

The Problem:

SSH isn’t installed/configured by default.

The Solution:

Install openshh by running the command:

# apt-get install openssh-server

That’s it. SSH will be served via the standard port 22.

If you need to restart the service for any reason type:

# /etc/init.d/ssh restart (DEBIAN)

OR

# service ssh restart (UBUNTU)

NB whilst completely and utterly not recommended you can enable root user to login via SSH:

Open /etc/ssh/sshd_config and change the following line:

FROM:
PermitRootLogin without-password
TO:
PermitRootLogin yes

# /etc/init.d/ssh restart (DEBIAN)

OR

# service ssh restart (UBUNTU)

 

Disclaimer: provided “AS IS” with no warranties and confer no rights

Advertisements