|
Автор |
Сообщение |
den
Старожил
Зарегистрирован: 31.01.2006 Сообщения: 13870 Откуда: Кировоград, Украина
|
|
|
|
1.Change your default SSH Port
Here's how you can do this:
# nano /etc/ssh/sshd_config
Port 2222
Now, while connecting SSH remotely:
# ssh -p 2222 root@192.168.1x.1xx
2.Disable default Root Access through SSH
Use any non root account for ssh and then switch (su–) to root account. Here's how you can do this:
# nano /etc/ssh/sshd_config
PermitRootLogin no
3.Disable password based authentication
Instead use public/private key pair only. Here's how you can do this:
# nano /etc/ssh/sshd_config
PasswordAuthentication no
4.Allow/Deny Specific Users/Groups
SSH server will allow all users to login to server be default. You can of course change that:
-Allow specific User:
# nano /etc/ssh/sshd_config
AllowUsers sks xyz
-Deny Specific User:
# nano /etc/ssh/sshd_config
DenyUsers sks xyz
-Allow Specific Groups:
# nano /etc/ssh/sshd_config
AllowGroups sks xyz
-Deny Specific Groups:
# nano /etc/ssh/sshd_config
DenyGroups sks xyz
5.Restrict SSH on specific network interface
Particularly useful for servers which have one interface connected directly to internet and another on LAN. Here's how you can do this:
# nano /etc/ssh/sshd_config
ListenAddress 192.168.10.100
ListenAddress 127.0.0.1 |
|
Вернуться к началу |
dhsilabs@jabber.ru |
|
|
chip
Тысячник
Зарегистрирован: 22.04.2010 Сообщения: 2498
|
|
|
|
я только пункт №3 игнорирую, удобнее все же паролем. |
|
Вернуться к началу |
|
|
den
Старожил
Зарегистрирован: 31.01.2006 Сообщения: 13870 Откуда: Кировоград, Украина
|
|
|
|
А ключами безопаснее таки |
|
Вернуться к началу |
dhsilabs@jabber.ru |
|
|
chip
Тысячник
Зарегистрирован: 22.04.2010 Сообщения: 2498
|
|
|
|
ну да, каюсь... |
|
Вернуться к началу |
|
|
chip
Тысячник
Зарегистрирован: 22.04.2010 Сообщения: 2498
|
|
|
|
в основном работаю за натом, так что не так страшно. |
|
Вернуться к началу |
|
|
chip
Тысячник
Зарегистрирован: 22.04.2010 Сообщения: 2498
|
|
|
|
10 команд для мониторинга вашей системы
1.top
Provides real-time report of the actual process activity. By default it details the most CPU-intensive tasks.
2.vmstat
Reports virtual memory statistics.
3.w
Displays info about the currently logged in users and their processes.
4.uptime
Reports the amount of time the server has been running, current time, number of users currently logged on and the system load average.
5.ps
Displays a snapshot of the current processes.
6.free
Displays the total amount of physical and swap memory in the system and the buffers used by the kernel.
7.iostat
Displays the CPU and input/output statistics for devices, partitions and network filesystems (NFS).
8.sar
Collects, reports and saves system activity info.
9.mpstat
Displays each available processor’s activities.
10.pmap
Reports the memory map of a process. |
|
Вернуться к началу |
|
|
|
|
 Главная страница сайта
|
Вы не можете начинать темы Вы не можете отвечать на сообщения Вы не можете редактировать свои сообщения Вы не можете удалять свои сообщения Вы не можете голосовать в опросах
|
|