0% found this document useful (0 votes)
42 views21 pages

Initial Server Setup With CentOS 7 - DigitalOcean

Uploaded by

tablet sej
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views21 pages

Initial Server Setup With CentOS 7 - DigitalOcean

Uploaded by

tablet sej
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

18/5/2021 Initial Server Setup with CentOS 7 | DigitalOcean

New
NEW CentOS 7 Server
App Platform: Checklist
reimagining PaaS to make it simpler for you to build, deploy, and scale apps.
Initial Server Setup with CentOS 7

TUTORIAL

Initial Server Setup with CentOS 7


Linux Basics CentOS Getting Started Initial Server Setup

By Mitchell Anicas
Published on July 21, 2014
 English 
 1m

Not using CentOS 7?


CentOS 7 
Choose a different version or distribution.

Introduction
When you first create a new server, there are a few configuration steps that you should
take early on as part of the basic setup. This will increase the security and usability of
your server and will give you a solid foundation for subsequent actions.

Step One — Root Login


To log into your server, you will need to know your server’s public IP address and the
password for the “root” user’s account. If you have not already logged into your server,
you may want to follow the first tutorial in this series, How to Connect to Your Droplet
with SSH, which covers this process in detail.

If you are not already connected to your server, go ahead and log in as the root user
using the following command (substitute the highlighted word with your server’s public IP
address):
Sign up for our newsletter Get the latest tutorials on SysAdmin and open source topics. ×
Enter your email address
local$ ssh root@ SERVER_IP_ADDRESS
S C RSign UpTO P
O L L TO

[Link] 1/21
18/5/2021 Initial Server Setup with CentOS 7 | DigitalOcean

Complete
New the
CentOS login process
7 Server by accepting the warning about host authenticity, if it
Checklist
appears,
Initial then
Server providing
Setup your root
with CentOS 7 authentication (password or private key). If it is your
first time logging into the server, with a password, you will also be prompted to change
the root password.

About Root
The root user is the administrative user in a Linux environment that has very broad
privileges. Because of the heightened privileges of the root account, you are actually
discouraged from using it on a regular basis. This is because part of the power inherent
with the root account is the ability to make very destructive changes, even by accident.

The next step is to set up an alternative user account with a reduced scope of influence
for day-to-day work. We’ll teach you how to gain increased privileges during the times
when you need them.

Step Two — Create a New User


Once you are logged in as root , we’re prepared to add the new user account that we will
use to log in from now on.

This example creates a new user called “demo”, but you should replace it with a user
name that you like:

# adduser demo

Next, assign a password to the new user (again, substitute “demo” with the user that you
just created):

# passwd demo

Enter a strong password, and repeat it again to verify it.

Step Three — Root Privileges


Now, we have a new user account with regular account privileges. However, we may
Sign up for our newsletter Get the latest tutorials on SysAdmin and open source topics. ×
sometimes need to do administrative tasks.
Enter your email address

To avoid having to log out of our normal user and log back in as the root account, we can
Sign
set up what is known as “super user” SorC Rroot UpTO P for our normal account. This will
O L L TO
privileges

[Link] 2/21
18/5/2021 Initial Server Setup with CentOS 7 | DigitalOcean

allowCentOS
New our normal userChecklist
7 Server to run commands with administrative privileges by putting the word
sudo Server
Initial beforeSetup
each with
command.
CentOS 7

To add these privileges to our new user, we need to add the new user to the “wheel”
group. By default, on CentOS 7, users who belong to the “wheel” group are allowed to use
the sudo command.

As root , run this command to add your new user to the wheel group (substitute the
highlighted word with your new user):

# gpasswd -a demo wheel

Now your user can run commands with super user privileges! For more information about
how this works, check out our sudoers tutorial.

Step Four — Add Public Key Authentication (Recommended)


The next step in securing your server is to set up public key authentication for your new
user. Setting this up will increase the security of your server by requiring a private SSH
key to log in.

Generate a Key Pair


If you do not already have an SSH key pair, which consists of a public and private key,
you need to generate one. If you already have a key that you want to use, skip to the
Copy the Public Key step.

To generate a new key pair, enter the following command at the terminal of your local
machine:

local$ ssh-keygen

Assuming your local user is called “localuser”, you will see output that looks like the
following:

Sign up for our newsletter Get the latest tutorials on SysAdmin and open source topics.
ssh-keygen output
×
Generating public/private
Enter your email address rsa key pair.
Enter file in which to save the key (/Users/ localuser /.ssh/id_rsa):
S C RSign UpTO P
O L L TO

[Link] 3/21
18/5/2021 Initial Server Setup with CentOS 7 | DigitalOcean

Hit return
New CentOSto 7accept
Serverthis file name and path (or enter a new name).
Checklist
Initial Server Setup with CentOS 7
Next, you will be prompted for a passphrase to secure the key with. You may either enter
a passphrase or leave the passphrase blank.

Note: If you leave the passphrase blank, you will be able to use the private key for
authentication without entering a passphrase. If you enter a passphrase, you will need
both the private key and the passphrase to log in. Securing your keys with passphrases is
more secure, but both methods have their uses and are more secure than basic
password authentication.

This generates a private key, id_rsa , and a public key, id_rsa.pub , in the .ssh
directory of the localuser’s home directory. Remember that the private key should not be
shared with anyone who should not have access to your servers!

Copy the Public Key


After generating an SSH key pair, you will want to copy your public key to your new
server. We will cover two easy ways to do this.

Note The ssh-copy-id method will not work on DigitalOcean if an SSH key was selected
during Droplet creation. This is because DigitalOcean disables password authentication if an
SSH key is present, and the ssh-copy-id relies on password authentication to copy the key.

If you are using DigitalOcean and selected an SSH key during Droplet creation, use option 2
instead.

Option 1: Use ssh-copy-id


If your local machine has the ssh-copy-id script installed, you can use it to install your
public key to any user that you have login credentials for.

Run the ssh-copy-id script by specifying the user and IP address of the server that you
want to install the key on, like this:

Sign up for our newsletter Get the latest tutorials on SysAdmin and open source topics. ×
local$ ssh-copy-id demo @ SERVER_IP_ADDRESS
Enter your email address

After providing your password at the prompt, your public key will be added to the remote
S C RSign UpTO P
O L L TO
user’s .ssh/authorized_keys file. The corresponding private key can now be used to

[Link] 4/21
18/5/2021 Initial Server Setup with CentOS 7 | DigitalOcean

log into
New the server.
CentOS 7 Server Checklist
Initial Server Setup with CentOS 7
Option 2: Manually Install the Key
Assuming you generated an SSH key pair using the previous step, use the following
command at the terminal of your local machine to print your public key ( id_rsa.pub ):

local$ cat ~/.ssh/id_rsa.pub

This should print your public SSH key, which should look something like the following:

id_rsa.pub contents
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDBGTO0tsVejssuaYR5R3Y/i73SppJAhme1dH7W2c47d4g

Select the public key, and copy it to your clipboard.

Add Public Key to New Remote User


To enable the use of SSH key to authenticate as the new remote user, you must add the
public key to a special file in the user’s home directory.

On the server, as the root user, enter the following command to switch to the new user
(substitute your own user name):

# su - demo

Now you will be in your new user’s home directory.

Create a new directory called .ssh and restrict its permissions with the following
commands:

$ mkdir .ssh
$ chmod 700 .ssh

Now open
Sign up fora our
file in
newsletter authorized_keys
.ssh calledGet with a text editor. We will use vi to edit
the latest tutorials on SysAdmin and open source topics. ×
the file:
Enter your email address

$ vi .ssh/authorized_keys S C RSign UpTO P


O L L TO

[Link] 5/21
18/5/2021 Initial Server Setup with CentOS 7 | DigitalOcean

EnterCentOS
New insert mode, byChecklist
7 Server pressing i , then enter your public key (which should be in your
clipboard)
Initial bySetup
Server pasting into the7editor. Now hit ESC to leave insert mode.
withit CentOS

Enter :x then ENTER to save and exit the file.

Now restrict the permissions of the authorized_keys file with this command:

$ chmod 600 .ssh/authorized_keys

Type this command once to return to the root user:

$ exit

Now you may SSH login as your new user, using the private key as authentication.

To read more about how key authentication works, read this tutorial: How To Configure
SSH Key-Based Authentication on a Linux Server.

Step Five — Configure SSH Daemon


Now that we have our new account, we can secure our server a little bit by modifying its
SSH daemon configuration (the program that allows us to log in remotely) to disallow
remote SSH access to the root account.

Begin by opening the configuration file with your text editor as root:

# vi /etc/ssh/sshd_config

Here, we have the option to disable root login through SSH. This is generally a more
secure setting since we can now access our server through our normal user account and
escalate privileges when necessary.

To disable remote root logins, we need to find the line that looks like this:

/etc/ssh/sshd_config (before)
Sign up for our newsletter Get the latest tutorials on SysAdmin and open source topics. ×
#PermitRootLogin
Enter your email addressyes

S C RSign UpTO P
O L L TO

[Link] 6/21
18/5/2021 Initial Server Setup with CentOS 7 | DigitalOcean

Hint:CentOS
New To search for this
7 Server line, type
Checklist /PermitRoot then hit ENTER . This should bring the
cursor
Initial to theSetup
Server “P” character on that
with CentOS 7 line.

Uncomment the line by deleting the “#” symbol (press Shift-x ).

Now move the cursor to the “yes” by pressing c .

Now replace “yes” by pressing cw , then typing in “no”. Hit Escape when you are done
editing. It should look like this:

/etc/ssh/sshd_config (after)

PermitRootLogin no

Disabling remote root login is highly recommended on every server!

Enter :x then ENTER to save and exit the file.

Reload SSH
Now that we have made our changes, we need to restart the SSH service so that it will
use our new configuration.

Type this to restart SSH

# systemctl reload sshd

Now, before we log out of the server, we should test our new configuration. We do not
want to disconnect until we can confirm that new connections can be established
successfully.

Open a new terminal window. In the new window, we need to begin a new connection to
our server. This time, instead of using the root account, we want to use the new account
that we created.

For the server that we configured above, connect using this command. Substitute your
Sign up for our newsletter Get the latest tutorials on SysAdmin and open source topics.
own information where it is appropriate:
×
Enter your email address

local$ ssh demo @ SERVER_IP_ADDRESS


S C RSign UpTO P
O L L TO

[Link] 7/21
18/5/2021 Initial Server Setup with CentOS 7 | DigitalOcean

Note:
New If you 7
CentOS are usingChecklist
Server PuTTY to connect to your servers, be sure to update the session’s
port number
Initial to match
Server Setup withyour server’s
CentOS 7 current configuration.

You will be prompted for the new user’s password that you configured. After that, you will
be logged in as your new user.

Remember, if you need to run a command with root privileges, type “sudo” before it like
this:

$ sudo command_to_run

If all is well, you can exit your sessions by typing:

$ exit

Where To Go From Here?


At this point, you have a solid foundation for your server. You can install any of the
software you need on your server now.

If you are not sure what you want to do with your server, check out the next tutorial in
this series for Additional Recommended Steps for New CentOS 7 Servers. It covers
things like enabling fail2ban to reduce the effectiveness of brute force attacks, basic
firewall settings, NTP, and swap files. It also provides links to tutorials that show you how
to set up common web applications.

If you just want to explore, take a look at the rest of our community to find more tutorials.
Some popular ideas are configuring a LAMP stack or a LEMP stack, which will
allow you to host websites.

Next in series: Additional Recommended Steps for New CentOS 7 Servers 

Was this helpful? Yes No    


74

Sign up for our newsletter Get the latest tutorials on SysAdmin and open source topics. ×
Report
Enteran issue
your email address

S C RSign UpTO P
O L L TO

[Link] 8/21
18/5/2021 Initial Server Setup with CentOS 7 | DigitalOcean

New CentOS
About 7 Server Checklist
the authors
Initial Server Setup with CentOS 7

Mitchell Anicas
Software Engineer DigitalOcean.
Former Señor Technical Writer I no
longer update articles or respond to
comments).

Tutorial Series

New CentOS 7 Server Checklist


When creating a new CentOS 7 server, there are some basic tasks that you
should take to ensure that your server is secure and configured properly.
This tutorial series will go over connecting to your server and general
security best practices, and will also provide links to articles that will help
you to start running your own web server or application.

Next in series: Additional Recommended Steps for New CentOS 7 Servers 

Still looking for an answer?

 Ask a question  Search for more help

Sign up for our newsletter Get the latest tutorials on SysAdmin and open source topics. ×
REL ATED
Enter your email address
How To Implement Browser Caching with Nginx's header Module on CentOS 8
Tutorial S C RSign UpTO P
O L L TO

[Link] 9/21
18/5/2021 Initial Server Setup with CentOS 7 | DigitalOcean

How To Improve Website Performance Using gzip and Nginx on Ubuntu 20.04
New CentOS 7 Server Checklist
Tutorial
Initial Server Setup with CentOS 7
Comments

74 Comments

Leave a comment...

Sign In to Comment

TechMan6510 July 21, 2014

0 Love all of these topics


Reply Report

grimavatar+digitalocean August 7, 2014

0 Can you add a step of configuration timezone for server? I guess it’s useful
Reply Report

kamaln7  August 7, 2014

0 @grimavatar+digitalocean You can change your server’s timezone by running the following
command:

cp /usr/share/zoneinfo/ Time/Zone /etc/localtime

Replace Time/Zone with your actual timezone, e.g. /usr/share/zoneinfo/Europe/London .


You can list the available timezones by running:
Sign up for our newsletter Get the latest tutorials on SysAdmin and open source topics. ×
Enterls -Remail
your /usr/share/zoneinfo
address

S C RSign UpTO P
O L L TO
Reply Report

[Link] 10/21
18/5/2021 Initial Server Setup with CentOS 7 | DigitalOcean

Newcontato765124
CentOS 7 ServerAugust 11, 2014
Checklist
0 ForServer
Initial someone layman
Setup with like me, feel
CentOS 7 a specialist following your tutorial. It’s like picking at hand.
Congratulations.
I followed the tutorial in full. Everything went well until the last statement, but when I login
(putty) using the user created, displays a message that server refused our key. What’s
wrong?
Reply Report

kamaln7  August 11, 2014

0 @contato Have you added your public key to the user’s .ssh/authorized_keys file? Are
there any errors?

sudo tail /var/log/secure

Reply Report

knappsych September 29, 2015

0
I’m having the same problems. I created the ssh key using PuTTy KeyGenerator. It works
for the root account, but not for the user account. I manually copied and pasted the
public key both from the PuTTy display and from a saved file. I also tried creating
known_hosts, based off the root directory, but that didn’t matter so I deleted it. The
results of

sudo tail /var/log/secure

were
Sep 29 13 56 11 centos-7-x64 sudo: william TTY=pts/1 ; PWD /home/william ;
USER=root ; COMMAND /bin/tail /var/log/secure
Sep 29 13 58 04 centos-7-x64 sudo: william TTY=pts/1 ; PWD /home/william/.ssh ;
USER=root ; COMMAND /bin/systemctl reload sshd
Sep 29 13 58 04 centos-7-x64 sshd[10061 Received SIGHUP; restarting.
Sep 29 13 58 04 centos-7-x64 sshd[10061 Server listening on [Link] port 22.
Sep 29 13 58 04 centos-7-x64 sshd[10061 Server listening on :: port 22.
Sep 29 13 58 11 centos-7-x64 sshd[16874 pamunix(sshd:session): session closed for
user william
Sign up for29
Sep our
13 newsletter
58 31 centos-7-x64
Get the sshd[16911
latest tutorialsAccepted password
on SysAdmin forsource
and open williamtopics.
from ×
[Link] port 65505 ssh2
Enter your email address
Sep 29 13 58 31 centos-7-x64 sshd[16911 pamunix(sshd:session): session opened for
user william by (uid=0
S C RSign UpTO P
O L L TO
Sep 29 13 58 56 centos-7-x64 sudo: william TTY=pts/1 ; PWD /home/william ;

[Link] 11/21
18/5/2021 Initial Server Setup with CentOS 7 | DigitalOcean

USER=root
New CentOS ; COMMAND
7 Server Checklist /bin/tail /var/log/secure
Sep 29
Initial Server 13 59with
Setup 03 centos-7-x64
CentOS 7 sudo: william TTY=pts/1 ; PWD /home/william ;
USER=root ; COMMAND /bin/tail /var/log/secure
Reply Report

[Link] August 12, 2014

0 @contato maybe you have to adjust the rights of the .ssh and authorized_keys file.

chmod 700 /home/your_user/.ssh


chmod 600 /home/your_user/.ssh/authorized_keys

Reply Report

unixadmin99 August 13, 2014

0 @[Link] That got me too. Thanks for the reminder.


Reply Report

contato765124 August 17, 2014

0 Thank’s Kamal, but not solved for me

[Link]. No file in home/ user folder. Only hidden files \ .bash …


Reply Report

zhaodong8701 August 29, 2014

1 thanks very much for the tutorial.


Reply Report

varreli August 31, 2014

0 hi haven’t tried it yet but where / when do you get the ip address? thanks can’t wait to start
it.
Reply Report

manicas  September 2, 2014

1
The droplets page in the DigitalOcean Control Panel displays the public IP address next
to your droplet name.
Reply Report

aaronstuder
Sign up for our September
newsletter4, 2014
Get the latest tutorials on SysAdmin and open source topics. ×
0 Please update this guide to include adding your SSH key to the new user, and setup the
Enter your email address
correct permissions on the directory and file.
Reply Report
S C RSign UpTO P
O L L TO

[Link] 12/21
18/5/2021 Initial Server Setup with CentOS 7 | DigitalOcean

aaronstuder
New CentOS 7 ServerSeptember
Checklist4, 2014

Also, something
Initial0Server Setup withshould
CentOS be7added about un-commenting. I know this, but some people
do not.
Reply Report

aaronstuder September 4, 2014

0
Also, the first command you should always run is yum update :)
Reply Report

artworked September 16, 2014

0 I’ve followed the steps correctly but for some weird reason, I’m no longer being able to
access the server via SSH using the new port.

As soon as I reset it back to 22 it works, if I change port, I try on 22 connection gets refused
(which is normal) but then I input the new port, I get a timeout error.

I’m I missing something here ?


Reply Report

manicas  September 16, 2014

0
Check if your firewall is dropping the port that you are binding SSHD to. Here’s a tutorial
on IPTables.

How To Set Up a Firewall Using Iptables on Ubuntu 14.04


by Justin Ellingwood

Sign up for
Theour newsletter
iptables firewall Get
is a the latest
great waytutorials on SysAdmin
to secure your Linuxand openIn
server. source [Link]'ll
this guide, ×
discuss how to configure iptables rules on an Ubuntu 14.04 server.
Enter your email address

Reply Report S C RSign UpTO P


O L L TO

[Link] 13/21
18/5/2021 Initial Server Setup with CentOS 7 | DigitalOcean

donoe1985
New CentOS June 2, 2015
7 Server Checklist
Hello, Setup
Initial0Server On Centos
with 7, You need
CentOS 7 to add a Firewall Rule to Open the new SSH Port using the
firewall-cmd command, Like this:

sudo firewall-cmd –zone=public –add-port=4444/tcp –permanent

In this tutorial explain that

Additional Recommended Steps for New CentOS 7 Servers


by Justin Ellingwood

After setting up the bare recommended configuration for a new server, there are
often some additional steps that are highly recommended in most cases. In this
guide, we'll continue the initial configuration by tackling some recommended, but

Reply Report

artworked September 16, 2014

0 I doubt this would work since it’s a Centos 7. With RHEL 7 / CentOS 7, firewalld was
introduced to manage iptables.
Reply Report

artworked September 17, 2014

0
Actually, it was the work Firewall that wasn’t allowing SSH Access :)

Thanks
Reply Report
Sign up for our newsletter Get the latest tutorials on SysAdmin and open source topics. ×
joeworks September 23, 2014
Enter your email address
0 This instruction does not work if you have SELinux enabled. You need to tell SELinux of the
new SSHD port: S C RSign UpTO P
O L L TO

[Link] 14/21
18/5/2021 Initial Server Setup with CentOS 7 | DigitalOcean

New CentOS 7 Server Checklist


# yum install policycoreutils-python
Initial #Server Setupport
semanage with -a
CentOS 7
-t ssh_port_t -p tcp 25000

Reply Report

dkearney September 24, 2014

0 I have tried editing the sshd_config now twice and each time I alter the port it messes it up,
ie I cannot access via port 25000
Reply Report

manicas  September 24, 2014

0
Assuming it’s configured correctly, here are a few likely reasons it is failing:

Your server’s firewall could be dropping requests on port 25000

You are accessing your server through a firewall that is blocking port 25000

SELinux is enabled and is not allowing that port for SSH

I actually removed the port-change step from the tutorial because it is not necessary for
most people. So feel free to just disable root login and leave it at that.
Reply Report

dkearney September 24, 2014

0
This is my first Centos, I have never had any issue changing the port on Ubuntu. And so
it was a brand new build. So does Centos have a firewall running automatically. I am not
going through a firewall. SELinux is disabled by default. So I am still a bit perplexed.
Reply Report

techspecx September 30, 2014

1 Nice article - helped very much. Have a good day!


Reply Report

info301725 November 14, 2014

0 I generated keys with puttygen, but is not working… my key starts like this BEGIN SSH2
PUBLIC KEY Comment: “rsa-key-20141113”

is this tutorial written for macs because windows does not have openSSH
Sign up for
Reply our newsletter Get the latest tutorials on SysAdmin and open source topics.
Report ×
Enter your email address
manicas  November 14, 2014
0
Sorry that you are having issues. Yes, this tutorial was written for systems with
S C RSign UpTO P
O L L TO
OpenSSH installed.

[Link] 15/21
18/5/2021 Initial Server Setup with CentOS 7 | DigitalOcean

For help
New CentOS with using
7 Server puttygen, check out this tutorial.
Checklist
Initial Server Setup with CentOS 7

How To Create SSH Keys With PuTTY to Connect to a VPS


by Pablo Carranza

This tutorial runs through creating SSH keys with PuTTY to connect to your
virtual server.

Reply Report

minn11c December 2, 2014

0 Hey guys,

Having an issue when trying to install phpmyadmin. I’ve googled but can’t seem to find any
help on this.

Finished Dependency Resolution


Error: Package: php-tcpdf-6.0.098 [Link] (epel)
Requires: php-tidy
Error: Package: php-mcrypt-5.3.3 3.el6.x8664 (epel)
Requires: php(api) 20090626
Installed: php-common-5.4.16 23.el70.3.x8664 (@updates)
php(api) 20100412 64
Available: php-common-5.4.16 21.el7.x8664 (base)
php(api) 20100412 64
Available:
Sign php-common-5.4.16
up for our newsletter Get 23.el7 0.x86
the latest 64 (updates)
tutorials on SysAdmin and open source topics. ×
php(api) 20100412 64
Enter your email
Available: address
php-common-5.4.16 23.el70.1.x8664 (updates)
php(api) 20100412 64
S C RSign UpTO P
O L L TO
Error: Package: php-mcrypt-5.3.3 3.el6.x8664 (epel)

[Link] 16/21
18/5/2021 Initial Server Setup with CentOS 7 | DigitalOcean

NewRequires:
CentOS php(zend-abi) 20090626
7 Server Checklist
Installed:
Initial Server php-common-5.4.16
Setup with CentOS 723.el70.3.x8664 (@updates)
php(zend-abi) 20100525 64
Available: php-common-5.4.16 21.el7.x8664 (base)
php(zend-abi) 20100525 64
Available: php-common-5.4.16 23.el70.x8664 (updates)
php(zend-abi) 20100525 64
Available: php-common-5.4.16 23.el70.1.x8664 (updates)
php(zend-abi) 20100525 64
You could try using –skip-broken to work around the problem
You could try running: rpm Va –nofiles –nodigest

Any advice please?


Reply Report

genesse December 11, 2014

0 I have successfully completed up until this step: Copy the Public Key
Unfortunately I am unable to copy the key…my pointer will not select it. Perhaps related to
the VirtualBox keyboard capture? How do I do this copy?
Reply Report

manicas  December 12, 2014

0
Have you installed the VirtualBox Guest Additions ?
Reply Report

andrewdiq December 26, 2014

0 This tutorial is missing firewall configuration: (other than that it’s great!
In CENTOS 7 as root user -

sudo firewall-cmd –permanent –remove-service=ssh


firewall-cmd –permanent –add-port=4444/tcp
firewall-cmd –reload
where 4444 is your custom port for ssh

then

ssh -p 4444 demo@SERVERIPADDRESS

willup
Sign work
for our newsletter Get the latest tutorials on SysAdmin and open source topics. ×
Reply Report
Enter your email address
thedude December 28, 2014

This is covered in the next chapter RSign


S C;) UpTO P
O L L TO
0

[Link] 17/21
18/5/2021 Initial Server Setup with CentOS 7 | DigitalOcean

New CentOS 7 Server Checklist


Initial Server Setup with CentOS 7

Additional Recommended Steps for New CentOS 7 Servers


by Justin Ellingwood

After setting up the bare recommended configuration for a new server, there are
often some additional steps that are highly recommended in most cases. In this
guide, we'll continue the initial configuration by tackling some recommended, but

Reply Report

dhoppe January 24, 2015

0
[deleted]
Reply Report

pawaadm January 27, 2015

0
appears to me this error message when I change the ssh port:

[Link] - OpenSSH server daemon


Loaded: loaded (/usr/lib/systemd/system/[Link]; disabled)
Active: activating (auto-restart) (Result: exit-code) since Ter 2015-0
Process: 16459 ExecStart=/usr/sbin/sshd -D $OPTIONS (code=exited, statu
Process: 16457 ExecStartPre=/usr/sbin/sshd-keygen (code=exited, status=
Main PID: 16459 (code=exited, status=255)

Jan 27 09:25:12 [Link] systemd[1]: [Link]: main process exited


Jan 27 09:25:12 [Link] systemd[1]: Unit [Link] entered failed

Sign up for our newsletter Get the latest tutorials on SysAdmin and open source topics. ×
Enter your email address
Reply Report

S C RSign UpTO P
O L L TO

[Link] 18/21
18/5/2021 Initial Server Setup with CentOS 7 | DigitalOcean

New CentOS 7 Server Checklist


Initial Server Setup with CentOS 7

Load More Comments

This work is licensed under a Creative


Commons Attribution-NonCommercial-
ShareAlike 4.0 International License.

GET OUR BIWEEKLY NEWSLETTER

Sign up for Infrastructure as a


Newsletter.

HOLLIE'S HUB FOR GOOD

Working on improving health and


education, reducing inequality,
Sign up for our newsletter
andGet the latest tutorials
spurring economic on SysAdmin and open source topics.
growth? ×
Enter your email address We'd like to help.

S C RSign UpTO P
O L L TO

[Link] 19/21
18/5/2021 Initial Server Setup with CentOS 7 | DigitalOcean

New CentOS 7 Server Checklist


Initial Server Setup with CentOS 7

BECOME A CONTRIBUTOR

You get paid; we donate to tech


nonprofits.

Featured on Community Kubernetes Course Learn Python 3 Machine Learning in Python


Getting started with Go Intro to Kubernetes

DigitalOcean Products Virtual Machines Managed Databases Managed Kubernetes Block Storage
Object Storage Marketplace VPC Load Balancers

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the


cloud and scale up as you grow – whether you’re
running one virtual machine or ten thousand.

Learn More

Sign up for our newsletter Get the latest tutorials on SysAdmin and open source topics. ×
Enter your email address

Company
S C RSign UpTO P
O L L TO

About
[Link] 20/21
18/5/2021 Initial Server Setup with CentOS 7 | DigitalOcean

Leadership
New CentOS 7 Server Checklist
© 2021 DigitalOcean, LLC. All rights reserved.
Initial Server Setup with CentOS 7 Blog
Careers
Partners
Referral Program
Press
Legal
Security & Trust Center

Products Community Contact

Pricing Tutorials Get Support


Products Overview Q&A Trouble Signing In?
Droplets Tools and Integrations Sales
Kubernetes Tags Report Abuse
Managed Databases Product Ideas System Status
Spaces Write for DigitalOcean
Marketplace Presentation Grants
Load Balancers Hatch Startup Program
Block Storage Shop Swag
API Documentation Research Program
Documentation Open Source
Release Notes Code of Conduct

Sign up for our newsletter Get the latest tutorials on SysAdmin and open source topics. ×
Enter your email address

S C RSign UpTO P
O L L TO

[Link] 21/21

You might also like