Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| networking:cisco:vty [2026/02/02 12:11] – [Cisco : VTY (Virtual Teletype) - telnet,ssh] ilyasa | networking:cisco:vty [2026/02/02 12:44] (current) – [Konfigurasi SSH] ilyasa | ||
|---|---|---|---|
| Line 8: | Line 8: | ||
| - | ==== Telnet ==== | + | ===== 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. | 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. | ||
| Line 16: | Line 15: | ||
| ==== Konfigurasi Telnet ==== | ==== Konfigurasi Telnet ==== | ||
| - | === 1. Konfigurasi Enable Secret | + | * **Step |
| Agar Telnet dapat digunakan untuk mengakses privileged EXEC mode, perintah '' | Agar Telnet dapat digunakan untuk mengakses privileged EXEC mode, perintah '' | ||
| + | < | ||
| + | R1(config)# | ||
| + | </ | ||
| - | < | + | * **Step 2 : (Optional) Konfigurasi Username dan ACL** |
| + | Username digunakan untuk autentikasi, | ||
| - | === 2. (Optional) Konfigurasi | + | < |
| + | R1(config)#username ilyasa secret ccna | ||
| + | R1(config)# | ||
| + | </ | ||
| + | * **Step 3 : Konfigurasi | ||
| + | Akses Telnet/SSH dikonfigurasi pada VTY line. Secara default tersedia 5 line (0–4). | ||
| + | < | ||
| + | R1(config)# | ||
| + | </ | ||
| - | Username digunakan untuk autentikasi, | + | * **Step 4 : (Optional) Konfigurasi Keamanan |
| - | < | + | Beberapa perintah tambahan untuk meningkatkan keamanan: |
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| - | === 3. Konfigurasi VTY Line === | + | < |
| + | SW1(config-line)# | ||
| + | SW1(config-line)# | ||
| + | SW1(config-line)# | ||
| + | </ | ||
| - | Akses Telnet/SSH dikonfigurasi | + | * **Step 5 : Konfigurasi Transport Input** |
| + | Perintah '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | < | ||
| + | SW1(config-line)#transport input telnet | ||
| + | </ | ||
| - | < | + | === Full Konfigurasi Telnet ==== |
| - | === 4. (Optional) Konfigurasi Keamanan VTY ==== | + | < |
| + | username ilyasa secret ccna | ||
| + | access-list 1 permit 192.168.122.0 0.0.0.255 | ||
| - | Beberapa perintah tambahan untuk meningkatkan keamanan: | + | 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 |
| - | <code> SW1(config-line)# | + | Username: ilyasa |
| + | Password: | ||
| + | R1> | ||
| + | </ | ||
| - | === 5. Konfigurasi Transport Input ==== | ||
| - | Perintah '' | + | ===== SSH ===== |
| + | SSH, atau Secure Shell, dikembangkan pada tahun 1995 untuk menggantikan | ||
| + | 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, | ||
| - | '' | + | 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)#ip domain name labyas.my.id | ||
| + | </ | ||
| - | === Full Konfigurasi Telnet ==== | + | ---- |
| - | < | + | * **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 | line vty 0 4 | ||
| - | access-class 1 in | + | access-class 1 in |
| - | exec-timeout 5 0 | + | |
| - | login local | + | login local |
| - | transport input telnet | + | |
| </ | </ | ||
| - | === Hasil Test Telnet | + | === Hasil Test SSH ==== |
| - | <code> ilyasa@lept0p: | + | <WRAP center round info 90%> |
| + | Opsi '' | ||
| + | </ | ||
| - | User Access Verification | ||
| - | Username: ilyasa | + | < |
| - | Password: | + | ilyasa@lept0p:~$ ssh -o HostKeyAlgorithms=+ssh-rsa |
| + | |||
| + | 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]) | ||
| + | |||
| + | |||
| + | |||
| + | ************************************************************************** | ||
| + | * 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> | R1> | ||
| </ | </ | ||