VTY (Virtual Teletype) adalah port atau antarmuka virtual yang digunakan untuk akses jarak jauh ke perangkat jaringan. Hal ini memungkinkan untuk mengelola dan mengonfigurasi perangkat Cisco melalui protokol seperti Telnet dan SSH.
Kebanyakan perangkat Cisco dilengkapi dengan 5 jalur VTY secara default: line vty 0 4
. ini berarti hingga 5 akses remote dapat dibuat secara bersamaan. Beberapa perangkat mungkin mendukung lebih banyak VTY line (misalnya, line vty 0 15
).
Telnet adalah protokol yang digunakan untuk mengakses Command-Line Interface (CLI) dari remote host dari jarak jauh, sehingga pengguna dapat terhubung ke perangkat di jaringan remote tanpa perlu koneksi kabel console secara langsung.
Dikembangkan pada tahun 1969, Telnet adalah protokol lama yang sebagian besar telah digantikan oleh SSH karena kurangnya keamanan, namun ia tetap baik untuk diketahui sebelum memahami SSH.
R1(config)#enable secret ccna
R1(config)#username ilyasa secret ccna
R1(config)#access-list 1 permit 192.168.1.0 0.0.0.255
R1(config)#line vty 0 4
exec-timeout
untuk mengatur executing timeout, login local
untuk login menggunakan user, dan access-class 1 in
untuk membatasi subnet jaringan.SW1(config-line)#login local
SW1(config-line)#exec-timeout 5 0
SW1(config-line)#access-class 1 in
transport input
digunakan untuk mengkonfigurasi jenis koneksi yang diizinkan ke VTY line, dengan option termasuk telnet
, SSH
, ALL, dan NONEtransport input telnet
allows only Telnet connections.transport input ssh allows
only SSH connections.transport input telnet ssh
allows both.transport input all
allows all connections. transport input none allows no connections.SW1(config-line)#transport input telnet
username ilyasa secret ccna
access-list 1 permit 192.168.122.0 0.0.0.255
line vty 0 4
access-class 1 in
exec-timeout 5 0
login local
transport input telnet
ilyasa@lept0p:~$ telnet 192.168.122.19
Trying 192.168.122.19...
Connected to 192.168.122.19.
Escape character is '^]'.
User Access Verification
Username: ilyasa
Password:
R1>
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, sehingga menyulitkan orang lain untuk mengakses isinya
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
R1#show version
Cisco IOS Software, IOSv Software (VIOS-ADVENTERPRISEK9-M), Version 15.9(3)M6, RELEASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2022 by Cisco Systems, Inc.
Compiled Mon 08-Aug-22 15:22 by mcpre
...
R1(config)#ip domain name labyas.my.id
R1(config)#crypto key generate rsa
crypto key generate rsa
digunakan untuk menghasilkan kunci RSA, yang akan diberi nama sesuai dengan FQDN perangkat, dalam hal ini SW1.jeremysitlab.comR1(config)#crypto key generate rsa
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.
How many bits in the modulus [512]: 2048
% Generating 2048 bit RSA keys, keys will be non-exportable...
[OK] (elapsed time was 1 seconds)
R1(config)#
*Dec 22 10:28:29.531: %SSH-5-ENABLED: SSH 1.99 has been enabled
R1#show ip ssh
SSH Enabled - version 1.99
Authentication methods:publickey,keyboard-interactive,password
Authentication Publickey Algorithms:x509v3-ssh-rsa,ssh-rsa
Hostkey Algorithms:x509v3-ssh-rsa,ssh-rsa
Encryption Algorithms:aes128-ctr,aes192-ctr,aes256-ctr
MAC Algorithms:hmac-sha2-256,hmac-sha2-512,hmac-sha1,hmac-sha1-96
KEX Algorithms:diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1
Authentication timeout: 120 secs; Authentication retries: 3
Minimum expected Diffie Hellman key size : 2048 bits
IOS Keys in SECSH format(ssh-rsa, base64 encoded): R1.labyas.my.id
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDHjXiLjNODKOGzDSqds1fCkioEwYxDFAt5u35Rxd2O
BcSJNnjIM2Z3OjZjORP3P+X/iz2E1szTe2/NkH/1+6zNEjMa52t7YyhTldVGceaPidgPEzO3GltMnUSJ
591NNObxMWWOzkO2w75p6MJqOXTem2pT0PedVS6Qe6m6KdLvEGfSw/C9DwcDMl4j9dU/DJtlI3F+lOsH
WVMk/gK52cWjW37VV+m7TCPI02zaCloOgCwy9TJdwF6gKWBk6sNVcTWVn84O3M5LJ7/BQlevr0lbFufY
Im/iIkc9OzN+zvGxs9DHrtCU24p/uspl1EMqpZ4fyFkqzrrpdtQwrSQA+5Ql
vty line 0 5
, sama dengan konfigurasi telnet dengan transport input ssh
username ilyasa secret ccna
access-list 1 permit 192.168.122.0 0.0.0.255
line vty 0 4
access-class 1 in
exec-timeout 5 0
login local
transport input ssh
Hasil Test:
ilyasa@lept0p:~$ ssh -o HostKeyAlgorithms=+ssh-rsa [email protected]
The authenticity of host '192.168.122.19 (192.168.122.19)' can't be established.
RSA key fingerprint is SHA256:umrNu6vY+tTho9GDL4/jyZLiZH+eqCnrMxCrflty0Ro.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '192.168.122.19' (RSA) to the list of known hosts.
**************************************************************************
* IOSv is strictly limited to use for evaluation, demonstration and IOS *
* education. IOSv is provided as-is and is not supported by Cisco's *
* 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's *
* 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>