
Linux Slackware

linux debian
Langsung saja untuk mengganti port SSH di linux ini adalah merupakan sebagian security pada server kita berikut konfigurasinya :
1. Login root ke server anda.
2. Cek port dengan mengetik :
# netstat -an
tcp 0 0 0.0.0.0:106 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:110 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:783 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:113 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:953 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN
tcp6 0 0 :::993 :::* LISTEN
tcp6 0 0 :::143 :::* LISTEN
tcp6 0 0 :::80 :::* LISTEN
tcp6 0 0 :::22 :::* LISTEN
106, 3306, 110, 783, 111, 113, 53, 21, 953, 25, 993, 143, 80, 22 itu merupakan port yang sudah dipakai di server anda.
3. server# cd /etc/ssh (enter)
server# vi sshd_config
# Package generated configuration file
# See the sshd(8) manpage for details
# What ports, IPs and protocols we listen for
#Port yang bisa anda ganti atau menambahkan port baru
Port 22 # anda bisa mengganti dengan port yang lain
Port 23456 # anda bisa menambahkan port yang lain
# Use these options to restrict which interfaces/protocols sshd will bind to
#ListenAddress ::
#ListenAddress 0.0.0.0
Protocol 2
# HostKeys for protocol version 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
#Privilege Separation is turned on for security
UsePrivilegeSeparation yes
Save dengan menekan (Esc :wq!) —> maka konfigurasi anda akan di save.
4. restart sshd mesin server anda
server# /etc/init.d/ssh restart (untuk debian)
server# /etc/rc.d/sshd restart (untuk slacware)
Restart mesin anda untuk lebih amannya.
server# reboot
Semoga Dapat bermanfaat
mangstabb tutornya…
inihh yg ak carii…
thx bang…..
ooooooooo………….
mantap tenan…… thanks.