Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| networking:cisco:vty [2026/02/02 12:08] – created ilyasa | networking:cisco:vty [2026/02/02 12:44] (current) – [Konfigurasi SSH] ilyasa | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ==== Cisco : VTY (Virtual Teletype) - telnet,ssh ==== | + | {{indexmenu_n> |
| + | ====== Cisco : VTY (Virtual Teletype) - telnet,ssh ====== | ||
| VTY (Virtual Teletype) adalah port atau antarmuka virtual yang digunakan untuk akses jarak jauh ke perangkat jaringan. VTY memungkinkan administrator mengelola dan mengonfigurasi perangkat Cisco melalui protokol seperti Telnet dan SSH tanpa koneksi kabel console langsung. | VTY (Virtual Teletype) adalah port atau antarmuka virtual yang digunakan untuk akses jarak jauh ke perangkat jaringan. VTY memungkinkan administrator mengelola dan mengonfigurasi perangkat Cisco melalui protokol seperti Telnet dan SSH tanpa koneksi kabel console langsung. | ||
| Sebagian besar perangkat Cisco menyediakan 5 jalur VTY secara default, yaitu '' | Sebagian besar perangkat Cisco menyediakan 5 jalur VTY secara default, yaitu '' | ||
| + | |||
| + | |||
| + | ===== Telnet ===== | ||
| + | Telnet adalah protokol yang digunakan untuk mengakses Command-Line Interface (CLI) dari perangkat jaringan secara jarak jauh. Protokol ini dikembangkan pada tahun 1969 dan merupakan salah satu metode remote access paling awal. | ||
| + | |||
| + | Karena tidak menggunakan enkripsi, Telnet dianggap tidak aman dan sebagian besar telah digantikan oleh SSH. Namun, Telnet tetap penting untuk dipahami sebagai dasar sebelum mempelajari SSH. | ||
| + | |||
| + | ==== Konfigurasi Telnet ==== | ||
| + | |||
| + | * **Step 1 - Konfigurasi Enable Secret** | ||
| + | Agar Telnet dapat digunakan untuk mengakses privileged EXEC mode, perintah '' | ||
| + | < | ||
| + | R1(config)# | ||
| + | </ | ||
| + | |||
| + | * **Step 2 : (Optional) Konfigurasi Username dan ACL** | ||
| + | Username digunakan untuk autentikasi, | ||
| + | |||
| + | < | ||
| + | R1(config)# | ||
| + | R1(config)# | ||
| + | </ | ||
| + | * **Step 3 : Konfigurasi VTY Line** | ||
| + | Akses Telnet/SSH dikonfigurasi pada VTY line. Secara default tersedia 5 line (0–4). | ||
| + | < | ||
| + | R1(config)# | ||
| + | </ | ||
| + | |||
| + | * **Step 4 : (Optional) Konfigurasi Keamanan VTY** | ||
| + | |||
| + | Beberapa perintah tambahan untuk meningkatkan keamanan: | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | |||
| + | < | ||
| + | SW1(config-line)# | ||
| + | SW1(config-line)# | ||
| + | SW1(config-line)# | ||
| + | </ | ||
| + | |||
| + | * **Step 5 : Konfigurasi Transport Input** | ||
| + | Perintah '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | < | ||
| + | SW1(config-line)# | ||
| + | </ | ||
| + | |||
| + | === Full Konfigurasi Telnet ==== | ||
| + | |||
| + | < | ||
| + | username ilyasa secret ccna | ||
| + | access-list 1 permit 192.168.122.0 0.0.0.255 | ||
| + | |||
| + | line vty 0 4 | ||
| + | | ||
| + | | ||
| + | login local | ||
| + | | ||
| + | </ | ||
| + | |||
| + | === Hasil Test Telnet ==== | ||
| + | |||
| + | < | ||
| + | ilyasa@lept0p: | ||
| + | Trying 192.168.122.19... | ||
| + | Connected to 192.168.122.19. | ||
| + | Escape character is ' | ||
| + | |||
| + | User Access Verification | ||
| + | |||
| + | Username: ilyasa | ||
| + | Password: | ||
| + | R1> | ||
| + | </ | ||
| + | |||
| + | |||
| + | ===== SSH ===== | ||
| + | SSH, atau Secure Shell, dikembangkan pada tahun 1995 untuk menggantikan protokol yang kurang aman seperti Telnet. | ||
| + | SSH menyediakan fitur keamanan seperti enkripsi dan autentikasi data, yang akan dibahas lebih lanjut di bagian keamanan dalam kursus ini. . | ||
| + | Paket SSH dienkripsi, dan hanya server dan klien SSH yang memiliki kunci untuk mendekripsi, | ||
| + | |||
| + | ==== Konfigurasi SSH ==== | ||
| + | |||
| + | |||
| + | * **Step 1 – Verifikasi IOS Mendukung SSH** | ||
| + | | ||
| + | Untuk mengonfigurasi SSH, kunci RSA harus dibuat, yang digunakan untuk enkripsi, dekripsi, dan autentikasi data, dan ini dapat dilakukan setelah memastikan image iOS mendukung SSH | ||
| + | |||
| + | Image IOS yang mendukung SSH akan memiliki ' | ||
| + | contoh : | ||
| + | < | ||
| + | R1#show version | ||
| + | Cisco IOS Software, IOSv Software (VIOS-ADVENTERPRISEK9-M), | ||
| + | Technical Support: http:// | ||
| + | Copyright (c) 1986-2022 by Cisco Systems, Inc. | ||
| + | Compiled Mon 08-Aug-22 15:22 by mcpre | ||
| + | ... | ||
| + | </ | ||
| + | |||
| + | ---- | ||
| + | |||
| + | * **Step 2 – Konfigurasi Domain Name** | ||
| + | | ||
| + | Domain name diperlukan untuk membentuk **FQDN (Fully Qualified Domain Name)** yang akan digunakan sebagai nama RSA key. | ||
| + | < | ||
| + | R1(config)# | ||
| + | </ | ||
| + | |||
| + | ---- | ||
| + | |||
| + | * **Step 3 – Generate RSA Key** | ||
| + | | ||
| + | RSA key digunakan untuk enkripsi, dekripsi, dan autentikasi SSH. | ||
| + | |||
| + | < | ||
| + | R1(config)# | ||
| + | </ | ||
| + | |||
| + | IOS akan menampilkan nama key berdasarkan FQDN perangkat: | ||
| + | |||
| + | < | ||
| + | R1(config)# | ||
| + | The name for the keys will be: R1.labyas.my.id | ||
| + | Choose the size of the key modulus in the range of 360 to 4096 for your | ||
| + | General Purpose Keys. Choosing a key modulus greater than 512 may take | ||
| + | a few minutes. | ||
| + | </ | ||
| + | |||
| + | ---- | ||
| + | |||
| + | * **Step 4 – Menentukan Panjang RSA Key** | ||
| + | | ||
| + | Semakin besar ukuran key, semakin aman, tetapi waktu generate lebih lama. | ||
| + | Untuk **SSHv2**, ukuran key **minimal 768 bit**, direkomendasikan **2048 bit**. | ||
| + | |||
| + | < | ||
| + | How many bits in the modulus [512]: 2048 | ||
| + | % Generating 2048 bit RSA keys, keys will be non-exportable... | ||
| + | [OK] (elapsed time was 1 seconds) | ||
| + | </ | ||
| + | |||
| + | ---- | ||
| + | |||
| + | * **Step 5 – Verifikasi SSH Aktif** | ||
| + | | ||
| + | Setelah RSA key dibuat, IOS akan menampilkan pesan Syslog bahwa SSH telah aktif. | ||
| + | |||
| + | < | ||
| + | R1(config)# | ||
| + | *Dec 22 10: | ||
| + | </ | ||
| + | |||
| + | Verifikasi status SSH dengan perintah berikut: | ||
| + | |||
| + | < | ||
| + | R1#show ip ssh | ||
| + | SSH Enabled - version 1.99 | ||
| + | Authentication methods: | ||
| + | Authentication Publickey Algorithms: | ||
| + | Hostkey Algorithms: | ||
| + | Encryption Algorithms: | ||
| + | MAC Algorithms: | ||
| + | KEX Algorithms: | ||
| + | Authentication timeout: 120 secs; Authentication retries: 3 | ||
| + | Minimum expected Diffie Hellman key size : 2048 bits | ||
| + | IOS Keys in SECSH format(ssh-rsa, | ||
| + | ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDHjXiLjNODKOGzDSqds1fCkioEwYxDFAt5u35Rxd2O | ||
| + | BcSJNnjIM2Z3OjZjORP3P+X/ | ||
| + | 591NNObxMWWOzkO2w75p6MJqOXTem2pT0PedVS6Qe6m6KdLvEGfSw/ | ||
| + | WVMk/ | ||
| + | Im/ | ||
| + | </ | ||
| + | |||
| + | ---- | ||
| + | |||
| + | * **Step 6 – Konfigurasi VTY** | ||
| + | Sekarang hanya perlu mengaktifkan ssh pada '' | ||
| + | |||
| + | < | ||
| + | username ilyasa secret ccna | ||
| + | access-list 1 permit 192.168.122.0 0.0.0.255 | ||
| + | |||
| + | line vty 0 4 | ||
| + | | ||
| + | | ||
| + | login local | ||
| + | | ||
| + | </ | ||
| + | |||
| + | === Hasil Test SSH ==== | ||
| + | |||
| + | <WRAP center round info 90%> | ||
| + | Opsi '' | ||
| + | </ | ||
| + | |||
| + | |||
| + | < | ||
| + | ilyasa@lept0p: | ||
| + | |||
| + | The authenticity of host ' | ||
| + | RSA key fingerprint is SHA256: | ||
| + | This key is not known by any other names. | ||
| + | Are you sure you want to continue connecting (yes/ | ||
| + | Warning: Permanently added ' | ||
| + | |||
| + | ************************************************************************** | ||
| + | * IOSv is strictly limited to use for evaluation, demonstration and IOS * | ||
| + | * education. IOSv is provided as-is and is not supported by Cisco' | ||
| + | * Technical Advisory Center. Any use or disclosure, in whole or in part, * | ||
| + | * of the IOSv Software or Documentation to any third party for any * | ||
| + | * purposes is expressly prohibited except as otherwise authorized by * | ||
| + | * Cisco in writing. | ||
| + | ********************************* **************************************** | ||
| + | ([email protected]) Password: | ||
| + | |||
| + | |||
| + | |||
| + | ************************************************************************** | ||
| + | * IOSv is strictly limited to use for evaluation, demonstration and IOS * | ||
| + | * education. IOSv is provided as-is and is not supported by Cisco' | ||
| + | * Technical Advisory Center. Any use or disclosure, in whole or in part, * | ||
| + | * of the IOSv Software or Documentation to any third party for any * | ||
| + | * purposes is expressly prohibited except as otherwise authorized by * | ||
| + | * Cisco in writing. | ||
| + | ************************************************************************** | ||
| + | R1> | ||
| + | </ | ||