วิธี SSH ข้ามเซิฟเวอร์โดยไม่ใส่รหัสผ่าน
ยกตัวอย่างเช่น ssh จากเครื่อง A ไปเครื่อง B โดยไม่ใช้รหัสผ่านในการ ssh @เครื่อง A ssh-keygen -t rsa (มีอะไรขึ้นมาก็กด enter ผ่านไปให้หมด แล้วพิมพ์คำสั..
from https://github.com/vdeville/ssh-login-alert-telegram
apt-get -y install git
cd /opt/ && git clone https://github.com/vdeville/ssh-login-alert-telegram.git
or
mkdir /opt/ssh-login-alert-telegram
cd /opt/ssh-login-alert-telegram
wget --no-check-certificate https://raw.githubusercontent.com/vdeville/ssh-login-alert-telegram/master/alert.sh
wget --no-check-certificate https://raw.githubusercontent.com/vdeville/ssh-login-alert-telegram/master/credentials.config
wget --no-check-certificate https://raw.githubusercontent.com/vdeville/ssh-login-alert-telegram/master/deploy.sh
vim credentials.config
#change USERID=999999999 //my-target profile id chat from @userinfobot
#change KEY="1111111111:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" //key bot api from @botfather
find USERID with https://t.me/userinfobot
create telegram bot for KEY with https://t.me/BotFather
test api
https://api.telegram.org/bot1111111111:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/sendMessage?chat_id=999999999&text=HelloWorld
deploy && test login ssh for Alert noti
bash deploy.sh
#if show "No zsh detected", yum/apt-get install -y zsh
April 3, 2023
Blog | #Command #Linux #Security
ยกตัวอย่างเช่น ssh จากเครื่อง A ไปเครื่อง B โดยไม่ใช้รหัสผ่านในการ ssh @เครื่อง A ssh-keygen -t rsa (มีอะไรขึ้นมาก็กด enter ผ่านไปให้หมด แล้วพิมพ์คำสั..
#การใช้ netstat ตรวจสอบการถูกยิงด้วย syn คำสั่ง netstat -ntu | grep SYN_RECV | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -nrอันนี้จะบอกว่..
find /home/*/domains/*/public_html/ -maxdepth 2 -type f -name '.htaccess' -print0 | xargs -0 grep -il '(py|exe|php)' find /home/*/domains/*/public_htm..
example error curl -I https://www.google.com/ curl: (60) SSL certificate problem: unable to get local issuer certificate . . ..
Solutions: Change and Update Time Zone (Bangkok ICT) on CentOS/Debian or other Linux rm -f /etc/localtime ln -s /usr/share/zoneinfo/Asia/Bangkok /etc/..
ติดตั้ง squid รุ่นล่าสุด https://www.squid-cache.org/Versions/ cd /tmp wget http://www.squid-cache.org/Versions/v3/3.4/squid-3.4.9.tar.gz tar xvfz squ..