Cheet Sheet

Remote menggunakan SSH

ssh -l [user][url/ip][port] 
ex : ssh -l ary 10.0.6.9

SSH Tunneling

ssh -l [user][url/ip] -p[port] -D[port_tunneling] 
ex: ssh -l ary 10.0.6.9 -p 2222 -D6969

Masuk sebagai root
Menggunakan screen

screen -S [nama_screen]
ex: screen -S coba

Cek user aktif

whoami

Change Directory
Print Working Directory

pwd

Copy Fle/Dir

cp [nama_file] [folder_tujuan]
ex: cp file berkas

Menampilkan Isi File Teks
Install Flash Player

apt-get install flashplugin-nonfree

Upgrade Flash Player

update-flashplugin-nonfree --install

Scan IP berserta Hosname

nmap -sP [ip_address/prefix]
ex: nmap -sP 10.1.10.0/24

Setting time and date

dpkg-reconfigure tzdata

WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!

ssh-keygen -R [ip_address]
ex: ssh-keygen -R 10.0.0.69

Informasi spesifikasi prosessor (CPU)

cat /proc/cpuinfo | grep 'model name'

Informasi spesifikasi memori (RAM)

cat /proc/meminfo | grep MemTotal

Informasi kapasitas total harddisk

sudo fdisk -l | grep Disk

Informasi spesifikasi chipset kartu grafis (VGA)

 lspci -nnk | grep VGA -A1

Melihat Paket Yang sudah terinstall

 dpkg --get-selections

Meliat Service Berlajan/Tidak

service --status-all

Cek Versi MYSQL

mysql -u root -p  
mysql> select @@version;
mysql> show variables like "%version%";

Find dan Delete file

find . -type f -name "FILE-TO-FIND" -exec rm -f {} \;
find . /var/www/assets/ -type f -name "_*" -exec rm -f {} \;

Python HTTP Server

Python2.7.x: python -m SimpleHTTPServer 80 (Port)
Python 3: python3 -m http.server 80 (Port)

Mengetahui RAM yang sudah terpasang (type dan speed)

dmidecode -t 17

Mengetahui maksimal RAM dan slot yang tersedia

dmidecode -t 16

Akses file lokal via SSH tunnel

ssh -vvv -L1570:10.0.0.10:2222 ary@ip-publik -p 2222

Leave a Reply

Your email address will not be published. Required fields are marked *