Apa itu SSH Config File?
Daripada ketik panjang setiap konek ke server:
ssh -p 2222 -i <path_key> <user>@<ip_server>
Dengan SSH Config File, cukup ketik:
ssh <alias>
1. Buat file config:
mkdir -p ~/.ssh && touch ~/.ssh/config
2. Edit file config:
nano ~/.ssh/config
3. Tambahkan konfigurasi server:
Host <alias>
HostName <ip_server>
User <user>
Port <port_ssh>
IdentityFile <path_key>
Contoh:
Host ubuntu-server-26-04
HostName 192.168.1.10
User fixploit03
Port 2222
IdentityFile ~/.ssh/id_ed25519
4. Atur permission file config:
chmod 600 ~/.ssh/config
5. Tes koneksi:
ssh <alias>
Kalau ada pertanyaan, silakan tanyakan di kolom komentar :)

Top comments (0)