Sunteți pe pagina 1din 2

Secure CLI Access with Secure Shell (SSH)

:Switch ‫اإلعدادات األولية للـ‬

Switch>enable
Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#enable secret cisco
Switch(config)#hostname S1
S1(config)#

:VLAN ‫إعدادات الـ‬

S1(config)# vlan 99
S1(config-vlan)#name MGT
S1(config-vlan)#exit
S1(config)#interface range fastethernet 0/24
S1(config-if)#switchport mode access
S1(config-if)#switchport access vlan 99
S1(config-if)#

:IP ‫إعدادات الـ‬

S1(config)#interface vlan 99
S1(config-if)#
%LINK-5-CHANGED: Interface Vlan99, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan99, changed state to up
S1(config-if)#ip address 192.168.99.2 255.255.255.0
S1(config-if)#no shutdown
S1(config-if)#end
:‫حفظ اإلعدادات‬
S1#
%SYS-5-CONFIG_I: Configured from console by console
S1#copy run start
Destination filename [startup-config]?
Building configuration...
[OK]
S1#
:Telnet ‫إعدادات الـ‬
S1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
S1(config)#line vty 0 15
S1(config-line)#password cisco
S1(config-line)#login
S1(config-line)#end
S1#
%SYS-5-CONFIG_I: Configured from console by console
:SSH ‫إعدادات الـ‬
S1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
S1(config)#ip domain-name tvtc.sa
S1(config)#crypto key generate rsa
The name for the keys will be: S1.tvtc.sa
Choose the size of the key modulus in the range of 360 to 2048 for your
General Purpose Keys. Choosing a key modulus greater than 512 may take
a few minutes.
How many bits in the modulus [512]: 1024
% Generating 1024 bit RSA keys, keys will be non-exportable...[OK]
S1(config)#ip ssh version 2
% :1:12:57.480 1 ‫*مارس‬SSH-5-ENABLED: SSH 1.99 has been enabled
S1(config)#line vty 0 15
S1(config-line)#transport input ssh
S1(config-line)#
:username ‫إعدادات الـ‬
S1>en
Password:
S1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
S1(config)#username sultan secret letmein
S1(config)#line vty 0 15
S1(config-line)#login local
S1(config-line)#
:SSH Client ‫إعدادات الـ‬
‫ وقم بتكرار‬Switch 2 ‫قم بالدخول الى‬

S2 ‫ مع تغيير االسم الى‬Switch ‫ اإلعدادات األولية للـ‬.1


0/23 ‫ مع تغيير المنفذ الى‬VLAN ‫ إعدادات الـ‬.2
192.168.99.3 ‫ الى‬IP ‫ مع تغيير الـ‬IP ‫ إعدادات الـ‬.3

‫ وقم بالتالي‬Switch 1 ‫قم بالدخول الى‬


S1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
S1(config)#int fa0/23
S1(config-if)#switchport mode access
S1(config-if)#switchport access vlan 99

:Telnet & SSH ‫أوامر االتصال عن طريق الـ‬

Telnet:
• telnet 192.168.99.2

SSH :
• ssh -l admin 192.168.99.2
• ssh -l sultan 192.168.99.2

S-ar putea să vă placă și