Some useful linux commands for a new server

First of all I would recommend to change the port of ssh:

vi /etc/ssh/sshd_config

service sshd reload

Find line Port 22 and change it to some other number greater than 1024.

Then, you would like to login to the server without using password. This procedure is described here. By the way, if by that time you have changed your ssh port, don’t forget to add -p1024 (or other port used) tu ssh commands you use in this tutorial. What is more, it is recommended to set .ssh folder permissions to 700 and .ssh/authorized_keys to 640:

chmod 700 .ssh

chmod 640 .ssh/authorized_keys

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.